Creating a book with chapters
We will start to write a book. First, we shall choose a class, and use some filler text to work out the page layout. Let's see how to do it:
- Create a new document, and enter the following lines as our preamble:
\documentclass[a4paper,12pt]{book} \usepackage[english]{babel} \usepackage{blindtext}
- Proceed with writing the document body containing a chapter heading, section and subsection headings, and some filler text:
\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}
- Compile it by clicking on Typeset. Look at the first page:
We have chosen the document class book
. As the name implies, this class is suitable for book-like documents. Books are commonly two-sided...