
죄송합니다. 이 질문이 약간 아마추어처럼 들린다면 방정식을 다중 라이닝하기 위한 이 네 가지 환경 간의 차이점에 대한 좋은 요약을 찾지 못했습니다. 어디가 다르며 상황에 따라 어느 것을 선택해야 합니까?
답변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}