O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – typesetting multi-line formulas

We shall use the amsmath package to experiment with a very long formula and with a system of equations:

  1. Start a new document on an A6 paper and load the amsmath package.
    \documentclass{article}
    \usepackage[a6paper]{geometry}
    \usepackage{amsmath}
    \begin{document}
  2. Use the multline environment to span a long equation over three lines. End the lines with \\:
    \begin{multline}
    \sum = a + b + c + d + e \\
        + f + g + h + i + j + \\
        + k + l + m + n
    \end{multline}
    \end{document}
  3. Typeset and look at the formula:
    Time for action – typesetting multi-line formulas
  4. Now we handle a system of equations. Use the gather environment to add these equations. Again, end lines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required