Book Image

LaTeX Beginner's Guide - Second Edition

By : Stefan Kottwitz
4 (1)
Book Image

LaTeX Beginner's Guide - Second Edition

4 (1)
By: Stefan Kottwitz

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.
Table of Contents (16 chapters)

Creating a table of contents

A book commonly begins with a table of contents, so let's create one based on our numbered headings:

  1. In our previous document, let's remove the options landscape and twocolumn.
  2. Remove the setspace package, that is, delete this line:
    \usepackage[onehalfspacing]{setspace} 
  3. Add the command \tableofcontents right after \begin{document}.

    Our code shall now look like this:

    \documentclass[a4paper,12pt]{book}
    \usepackage[english]{babel}
    \usepackage{blindtext}
    \usepackage[a4paper, inner=1.5cm, outer=3cm, top=2cm,
    bottom=3cm, bindingoffset=1cm]{geometry}
    \begin{document}
    \tableofcontents
    \chapter{Exploring the page layout}
    In this chapter we will study the layout of pages.
    \section{Some filler text}
    \blindtext
    \section{A lot more filler text}
    More dummy text will follow.
    \subsection{Plenty of filler text}
    \blindtext[10]
    \end{document}
  4. Compile the code twice. Afterward, the first page of your output will contain this table:
...