答案1
alignat
我认为使用oralignat*
环境而不是array
环境来显示多行方程式更好,原因有二。首先,与array
使用环境相比,行之间的间隔略大。其次,默认情况下,材料以显示样式数学模式排版 - 这对于显示的方程式来说是合适的。
\documentclass{article}
\usepackage{amsmath} % for 'alignat*' env.
\usepackage{newtxtext,newtxmath} % Times Roman text and math fonts
\begin{document}
\begin{alignat*}{2}
A+(B+C)
&= [a_{ij}]+[b_{ij}+c_{ij}] &\qquad& \text{by Definition 1.29} \\
&= [a_{ij}+(b_{ij}+c_{ij})] && \text{by Definition 1.29} \\
&= [(a_{ij}+b_{ij})+c_{ij}] && \text{since addition in $\mathbf{R}$ is associative} \\
&= [a_{ij}+b_{ij}]+[c_{ij}] && \text{by Definition 1.29} \\
&= (A+B)+C
\end{alignat*}
\end{document}
答案2
附有{WithArrows}
包裹witharrows
。
\documentclass{article}
\usepackage{mathtools} % for \MoveEqLeft
\usepackage{witharrows}
\begin{document}
The following equalities establish the associative property for addition.
$\begin{WithArrows}
\MoveEqLeft{A+(B+C)} \Arrow{By definition 1.29} \\
&=\left[a_{ij}\right]+\left[b_{ij}+c_{ij}\right] \Arrow{By definition 1.29}\\
&=\left[a_{ij}+\left(b_{ij}+c_{ij}\right)\right] \Arrow{since addition in $\mathbf R$ is associative}\\
&=\left[\left(a_{ij}+b_{ij}\right)+c_{ij}\right] \Arrow{By definition 1.29}\\
&=\left[a_{ij}+b_{ij}\right]+\left[c_{ij}\right] \Arrow{By definition 1.29} \\
&=(A+B)+C
\end{WithArrows}$
\end{document}
答案3
有以下可能性:
\documentclass{article}
\usepackage{array}
\begin{document}
The following equalities establish the associative property for addition.
\[\begin{array}{r @{} >{{}}c<{{}} @{} ll}
A+(B+C)&=&[a_{ij}]+[b_{ij}+c_{ij}]&\mbox{By definition 1.29}\\
&=&[a_{ij}+(b_{ij}+c_{ij})]&\mbox{By definition 1.29}\\
&=&[(a_{ij}+b_{ij})+c_{ij}]&\mbox{since addition in $\mathbf R$ is associative}\\
&=&[a_{ij}+b_{ij}]+[c_{ij}]&\mbox{By definition 1.29}\\
&=&(A+B)+C&\mbox{By definition 1.29}
\end{array}\]
\end{document}
答案4
作为起点被视为@José Carlos Santos 回答(+1):
\documentclass{article}
\usepackage{array}
\begin{document}
The following equalities establish the associative property for addition.
\[\renewcommand\arraystretch{1.2}
\begin{array}{r@{\,}c@{\,}l >{\qquad$}l<{$}}
A+(B+C) &=& [a_{ij}] + [b_{ij} + c_{ij}] & by definition 1.29 \\
&=& [a_{ij}+ (b_{ij} + c_{ij})] & by definition 1.29 \\
&=& [(a_{ij}+b_{ij}) + c_{ij}] & since addition in $\mathbf{R}$ is associative\\
&=& [a_{ij}+b_{ij}] + [c_{ij}] & by definition 1.29 \\
&=& (A+B)+C & by definition 1.29
\end{array}
\]
\end{document}