Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
LaTeX Beginner's Guide - Second Edition

You're reading from  LaTeX Beginner's Guide - Second Edition

Product type Book
Published in Oct 2021
Publisher Packt
ISBN-13 9781801078658
Pages 354 pages
Edition 2nd Edition
Languages
Author (1):
Stefan Kottwitz Stefan Kottwitz
Profile icon Stefan Kottwitz

Table of Contents (16) Chapters

Preface 1. Chapter 1: Getting Started with LaTeX 2. Chapter 2: Formatting Text and Creating Macros 3. Chapter 3: Designing Pages 4. Chapter 4: Creating Lists 5. Chapter 5: Including Images 6. Chapter 6: Creating Tables 7. Chapter 7: Using Cross-References 8. Chapter 8: Listing Contents and References 9. Chapter 9: Writing Math Formulas 10. Chapter 10: Using Fonts 11. Chapter 11: Developing Large Documents 12. Chapter 12: Enhancing Your Documents Further 13. Chapter 13: Troubleshooting 14. Chapter 14: Using Online Resources 15. Other Books You May Enjoy

Typesetting multi-line formulas

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

  1. 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}
  2. Load the amsmath package, and begin the document:
    \usepackage{amsmath}
    \begin{document}
  3. 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}
  4. Click on Typeset to compile, and look at the formula:

    Figure 9.16 – A formula spanning three lines

  5. Now we handle a system of equations. Use the gather environment...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}