
私は物理学の文書をタイプセットしていますが、ほとんどの場合は 1 行の数式を入力するだけでよいのに、場合によっては数行の方程式を入力する必要があります。とalign
を切り替える代わりに、常に 環境を使用しても問題ありませんか? これらの違いは何ですか?align
equation
答え1
の垂直間隔は異なりますが、特定の場合にのみ目立ちます。これを確認するには、これらのディスプレイの周囲にテキストを配置できるすべての可能な方法を検討してください。
\documentclass{article}
\usepackage{amsmath}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}
Long/long line before/after display:
\begin{minipage}[t]{.5\textwidth}
Lorem ipsum.
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
Lorem ipsum.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
Lorem ipsum.
\begin{align}
f(x) = ax^2 + bx + c
\end{align}
Lorem ipsum.
\end{minipage}
\hrulefill
Long/short line before/after display:
\begin{minipage}[t]{.5\textwidth}
Lorem ipsum.
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
Lrm.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
Lorem ipsum.
\begin{align}
f(x) = ax^2 + bx + c
\end{align}
Lrm.
\end{minipage}
\bigskip
\hrulefill
\bigskip
Short/long line before/after display:
\begin{minipage}[t]{.5\textwidth}
Lrm:
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
Lorem ipsum.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
Lrm:
\begin{align}
f(x) = ax^2 + bx + c
\end{align}
Lorem ipsum.
\end{minipage}
\hrulefill
Short/short line before/after display:
\begin{minipage}[t]{.5\textwidth}
Lrm:
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
Lrm.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
Lrm:
\begin{align}
f(x) = ax^2 + bx + c
\end{align}
Lrm.
\end{minipage}
\end{document}
上記は、表示の直前/直後の長い/短いテキストのすべての組み合わせの使用を示しています。左の列は の使用を示しequation
、右の列は を使用した同等のものを使用していますalign
。これらは、TeX の表示スキップの使用に影響します。
\abovedisplayskip% If the line ending above the display is not short
\abovedisplayshortskip% ... If the line ending above the display is short
\belowdisplayskip% If the line ending below the display is not short
\belowdisplayshortskip% ... If the line ending below the display is short
短い線は明らかだその上 align
equation
は、(式(6)と(8)の上の大きなスキップを、式(5)と(7)のスキップと比較すると)とは解釈が異なります。
しかし、それだけではありません。上の画像はその意味で少し誤解を招くものです。もしsが上ではなく下minipage
にあったら[b]
[t]
スキップしても下にalign
表示に続く行が短い場合は、解釈が異なります。
内で単一の方程式を使用しても問題ありませんかalign
? 見た目に問題がなければ、問題ありません。 周囲にテキストがある場合は、ディスプレイの両側に長い (「短くない」) 線が表示されることが予想されます。その場合、 は(上記の方程式 (1) ~ (4))align
と同様に「機能します」equation
。
答え2
コメントに記載されているように、唯一の違いは数式の間隔です。equation
可能であれば、align
複数行の数式がある場合は、 を使用するようにしてください。
また、環境内にequation
がある場合にはエラーがスローされるため、2 つ間で変換する場合はその点に注意してください。&