Time for action – writing a book with chapters

We will start to write a book. At first, we shall choose a class, further we will use some filler text to work out the page layout.

  1. Create a new document with the following code:
    \documentclass[a4paper,12pt]{book}
    \usepackage[english]{babel}
    \usepackage{blindtext}
    \begin{document}
    \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}
  2. Save the document and Typeset it. Look at the first page:
    Time for action – writing a book with chapters

What just happened? ...

Get LaTeX Beginners Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.