Typesetting multi-line formulas
We shall use the amsmath
package to typeset a very long formula and a system of equations:
- Start a new document on A6 paper size to have a smaller text width, so we can see what happens with line breaks without typing super long formulas:
\documentclass{article} \usepackage[a6paper]{geometry}
- Load the
amsmath
package, and begin the document:\usepackage{amsmath} \begin{document}
- Use the
multline
environment to span a long equation over three lines. End the lines with a double backslash\\
, except the last one:\begin{multline} \sum = a + b + c + d + e \\ + f + g + h + i + j \\ + k + l + m + n \end{multline} \end{document}
- Click on Typeset to compile, and look at the formula:
- Now we handle a system of equations. Use the
gather
environment...