20170101 branch
[latex2e.git] / latex2e-20170101 / required / amsmath / testfiles / amsldoc-3.lvt
blobfbf6f7dac994a11c7e342be3d6c2caedc97d0490
1 \documentclass{article}
4 \usepackage{amsmath}
5 \input{test2e}
6 \showoutput
7 \begin{document}
9 \START
11 To have several equation columns side-by-side, use extra ampersands
12 to separate the columns:
13 \begin{align}
14 x&=y       & X&=Y       & a&=b+c\\
15 x'&=y'     & X'&=Y'     & a'&=b\\
16 x+x'&=y+y' & X+X'&=Y+Y' & a'b&=c'b
17 \end{align}
19 Line-by-line annotations on an equation can be done by judicious
20 application of text inside an align environment:
21 \begin{align}
22 x& = y_1-y_2+y_3-y_5+y_8-\dots
23                     && \text{by (1)}\\
24  & = y'\circ y^*    && \text{by (2)}\\
25  & = y(0) y'        && \text {by Axiom 1.}
26 \end{align}
29 alignat: count the maximum number of \verb'&'s
30 in any row, add 1 and divide by 2.
31 \begin{alignat}{2}
32 x& = y_1-y_2+y_3-y_5+y_8-\dots
33                   &\quad& \text{by (1)}\\
34  & = y'\circ y^*  && \text{by (2)}\\
35  & = y(0) y'      && \text {by Axiom 1.}
36 \end{alignat}
37 \end{document}