4 (1)

4 (1)

#### Overview of this book

LaTeX is high-quality open source typesetting software that produces professional prints and PDF files. It's a powerful and complex tool with a multitude of features, so getting started can be intimidating. However, once you become comfortable with LaTeX, its capabilities far outweigh any initial challenges, and this book will help you with just that! The LaTeX Beginner's Guide will make getting started with LaTeX easy. If you are writing mathematical, scientific, or business papers, or have a thesis to write, this is the perfect book for you. With the help of fully explained examples, this book offers a practical introduction to LaTeX with plenty of step-by-step examples that will help you achieve professional-level results in no time. You'll learn to typeset documents containing tables, figures, formulas, and common book elements such as bibliographies, glossaries, and indexes, and go on to manage complex documents and use modern PDF features. You'll also get to grips with using macros and styles to maintain a consistent document structure while saving typing work. By the end of this LaTeX book, you'll have learned how to fine-tune text and page layout, create professional-looking tables, include figures, present complex mathematical formulas, manage complex documents, and benefit from modern PDF features.
Preface
Chapter 1: Getting Started with LaTeX
Free Chapter
Chapter 2: Formatting Text and Creating Macros
Chapter 3: Designing Pages
Chapter 4: Creating Lists
Chapter 5: Including Images
Chapter 6: Creating Tables
Chapter 7: Using Cross-References
Chapter 8: Listing Contents and References
Chapter 9: Writing Math Formulas
Chapter 10: Using Fonts
Chapter 11: Developing Large Documents
Chapter 12: Enhancing Your Documents Further
Chapter 13: Troubleshooting
Chapter 14: Using Online Resources
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...