未分類

tex で方程式を文書の中央揃えにする(eqnarray→ align)

投稿日:

amsmath パッケージを使ったうえで、align を使う。
次の例では eqnarray の代わりに、align を使っている。

\usepackage {amsmath} 
\begin{document}

\begin{align}
f(x) = x^2 \\
g(x) = 2x-1
\end{align}

\end{document}

結果

-未分類

執筆者:


comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

tex で⇔記号の上に文字を表示する方法

\underset を使って表示することができる。amsmath パッケージを使う。 例 \usepackage{amsmath} \begin{document} $\underset{\Leftr …

no image

tex でオーム記号を入力する方法

siunit のパッケージを使って、\si{\ohm} で入力する。 例 \usepackage{siunitx} \begin{document} \si{\ohm} \end{document} …

no image

python3 でカンマの入った数値の文字列を数値に変換する方法

replace と int 変換を組み合わせる。 例 str1 = ‘1,234,567’ int1 = int(str1.replace(‘,’,”)) print(int1) 結果 123456 …

no image

tex で、割り算記号を入力する方法

physics パッケージを使って、\divisionsymbol で割り算記号が入力できる。 例 \usepackage{physics} \begin{document} $2 \division …

no image

matplotlib で x, y軸・タイトルのフォントサイズを調整する

ラベルの fontsize で指定する。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2, 100) …