amsmath
https://michael-prokop.at/latextug/amsldoc.pdf
Table of Contents
- Add line by line comments to math proofs
\begin{equation}vs\begin{equation*}- What does a double ampersand (
&&) mean?
Add line by line comments to math proofs howto
- Use
\begin{algin*}along with&&:
\begin{align*}
3+x &=4 && \text{we are trying to solve for } x\\
x &=4-3 && \text{Subtract 3 from both sides}\\
x &=1 && x \text{ must be one}
\end{align*}\[\begin{align*}
3+x &=4 && \text{we are trying to solve for } x\\
x &=4-3 && \text{Subtract 3 from both sides}\\
x &=1 && x \text{ must be one}
\end{align*}
\]
\begin{equation} vs \begin{equation*} discussion
Each environment has both starred and unstarred forms, where the unstarred forms have automatic numbering using LATEX’s equation counter. You can suppress the number on any particular line by putting
\notagbefore the\\
What does a double ampersand (&&) mean? discussion
An align is a table-like structure, and & is a column separator. The thing is that the columns in an align are rlrlrlrlrl..., that is, every other column is right aligned and left aligned.
\[\begin{align}
a &= b\\
a &= b & text\\
a &= b && text
\end{align}
\]
- In
a &= b,ais right aligned while=bis left aligned. - In
a &= b & text,textis right aligned. - In
a &= b && text, an right-aligned empty column, followed by left alignedtext.