数式を複数行に分割するための split、multline、align、breqn の違いは何ですか?

数式を複数行に分割するための split、multline、align、breqn の違いは何ですか?

申し訳ありませんが、この質問は少し素人っぽいように聞こえますが、方程式をマルチライン化するこれら 4 つの環境の違いについて、適切な要約を見つけることができませんでした。どこが異なり、さまざまな状況でどれを選択すればよいのでしょうか。

答え1

コメントに記載されているように、amsmathおよびbreqnドキュメントにはいくつかの良い例があり、mathtoolsパッケージにはいくつかのamsmathアラインメントの拡張バージョンもあります。ただし、ここでの通常のスタイルは、マニュアルを参照するのではなく、インラインで回答することです。したがって、これは、言及した環境の基本的な使用方法を示すドキュメントです。

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

\documentclass{article}

\usepackage{amsmath}
\usepackage{breqn}

\begin{document}

Align, from amsmath package:
numbered equations aligned at points marked
with \verb|&| usually just before a relation.
\begin{align}
a_1& =b_1+c_1\\
a_2& =b_2+c_2-d_2+e_2
\end{align}

split, also from amsmath,
similar alignment to align, but the whole construct fits within
equation (or other display math) and is numbered as a unit.
\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
 & \quad +e-f\\
 & =g+h\\
 & =i
\end{split}
\end{equation}

multline, from amsmath
for lonq expressions taking more than one line,
with no specifed alignment points.
\begin{multline}
a+b+c+d+e+f+g+h+i+j+k+\\
l+m+n+o+p+q+r+s+t+w+x+y+z
\end{multline}


breqn is not part of the amsmath collection and is a highly experimental
package that tries to automate the line breaking.
Here it automatically spots the relations and adds
the line breaks and alignment points.
It also automatically handles the trailing full stop after the display.
\begin{dmath}
T(n) \hiderel{\leq} T(2^{\lceil\lg n\rceil})
  \leq c(3^{\lceil\lg n\rceil}
    -2^{\lceil\lg n\rceil})
  <3c\cdot3^{\lg n}
  =3c\,n^{\lg3}
\end{dmath}.

\end{document}

関連情報