xaphirecipes

recipes for all the small things in life …

Line breaks in equations

If you have a long equation and you need a line break in the equation, use the following code:

\begin{equation} \begin{split} x = & very long equation part 1\\ & very long equation part 2 \label{longeq} \end{split} \end{equation}

Use the “&” sign to align the lines.