# amsmath

## https://michael-prokop.at/latextug/amsldoc.pdf

• 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*}

# 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 \notag before 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}
\begin{align} a &= b\\ a &= b & text\\ a &= b && text \end{align}
• In a &= b, a is right aligned while =b is left aligned.
• In a &= b & text, text is right aligned.
• In a &= b && text, an right-aligned empty column, followed by left aligned text.