amsmath - francois-rozet/sleek-template GitHub Wiki

AMSmath

Features of the amsmath package.

Environments

Environment Displaying multiple-lines math expressions with
align Basic alignment
aligned Basic alignment within another math environment
alignat Advanced alignment

align and alignat label each of their lines. If you want one to be unlabeled, use the command \nonumber within that line.

However, align and alignat both have a starred (*) version unlabeling all lines.

Environment Purpose
subequations Sub-labeling equations

Examples

\begin{align}
    x & = r \sin \theta \cos \phi             \\
    y & = r \sin \theta \sin \phi {\nonumber} \\
    z & = r \cos \theta
\end{align}

\begin{equation}
    \left\{
    \begin{aligned}
        x & = r \sin \theta \cos \phi \\
        y & = r \sin \theta \sin \phi \\
        z & = r \cos \theta
    \end{aligned}
    \right.
\end{equation}

\begin{alignat*}{2}
	                      & & \mathcal{P}(A, B)  & = \mathcal{P}(A | B) \mathcal{P}(B)                        \\
	\Leftrightarrow \quad & & \mathcal{P}(A | B) & = \frac{\mathcal{P}(A, B)}{\mathcal{P}(B)}                 \\
	                      & &                    & = \mathcal{P}(B | A) \frac{\mathcal{P}(A)}{\mathcal{P}(B)}
\end{alignat*}

\begin{subequations}
    \begin{align}
        x & = r \sin \theta \cos \phi             \\
        y & = r \sin \theta \sin \phi {\nonumber} \\
        z & = r \cos \theta
    \end{align}
\end{subequations}
⚠️ **GitHub.com Fallback** ⚠️