文字の代わりに絵を配置する

文字の代わりに絵を配置する

下の画像のように、テキスト内に画像(JPG または PDF)を配置することはできますか?

ここに画像の説明を入力してください

答え1

画像は LaTeX では文字と同じように扱われるので、\includegraphicsそのまま使用して挿入します。

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{graphicx}

\newcommand{\mysymbol}{%
  \raisebox{-.2\baselineskip}{% ...lower image slightly
    \includegraphics[height=.8\baselineskip]{example-image}}}

\begin{document}

In Theorem~2.4 we show that, for any given $x_0 \in \mathcal{H} \setminus A^{-1}(0)$, 
and $\theta > 0$, there exists a unique strong (locally Lipschitz in time) global solution
$t \mapsto (x(t), \lambda(t))$ of~\mbox{(4)} which satisfies the Cauchy data $x(0) = x_0$.
It is convenient to define 
$\mysymbol = \{(\omega,\eta,\zeta) : \psi_{\Lambda,\beta,h}(\omega,\eta,\zeta) = 0, \mathrm{hold(2,a),(2.b)}\}$.

\end{document}

使用したい「シンボル」のマクロを定義したことに注意してください。これは、ドキュメント全体で表記法を再利用したい場合に一般的です。一貫性を促進する

答え2

\vcenterで機能するがありますmathmode。高さを自動的に調整し、画像を標識の高さの中央に配置しますminus。そのため、\newcommand次のようになります。

\newcommand{\mysymbol}{%
  \vcenter{\hbox{\includegraphics[height=2\baselineskip]{example-image}}
  }
}

どのように動作するかを確認するには、少し大きい画像で以下の例を参照してください。

\documentclass{article}
\usepackage{graphicx}

\newcommand{\mysymbol}{%
  \vcenter{\hbox{\includegraphics[height=2\baselineskip]{example-image}}
  }
}

\begin{document}

In Theorem~2.4 we show that, for any given $x_0 \in \mathcal{H} \setminus A^{-1}(0)$, 
and $\theta > 0$, there exists a unique strong (locally Lipschitz in time) global solution
$t \mapsto (x(t), \lambda(t))$ of~\mbox{(4)} which satisfies the Cauchy data $x(0) = x_0$.
It is convenient to define 
$\mysymbol = \{(\omega,\eta,\zeta) : \psi_{\Lambda,\beta,h}(\omega,\eta,\zeta) = 0, \mathrm{hold(2,a),(2.b)}\}$.
\\
In Theorem~2.4 we show that, for any given $x_0 \in \mathcal{H} \setminus A^{-1}(0)$, 
and $\theta > 0$, there exists a unique strong (locally Lipschitz in time) global solution
$t \mapsto (x(t), \lambda(t))$ of~\mbox{(4)} which satisfies the Cauchy data $x(0) = x_0$.
It is convenient to define 
$\mysymbol = \{(\omega,\eta,\zeta) : \psi_{\Lambda,\beta,h}(\omega,\eta,\zeta) = 0, \mathrm{hold(2,a),(2.b)}\}$.

\end{document}

ここに画像の説明を入力してください

関連情報