Breaking pages
As you've seen in our example, LaTeX itself took care of the page breaking. There might be occasions where we'd like to insert a page break ourselves before LaTeX does. LaTeX offers several commands to do so, with vertical balance or without.
We will now go back to the first version of our example and we shall manually insert a page break right before subsection 1.2.1:
- Insert the highlighted line into our example, which contains the
\pagebreak
command:\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. \pagebreak \subsection{Plenty of filler text} \blindtext[10] \end{document}
- Compile the code and take a look at the result:
- Replace
\pagebreak
with\newpage
. - Compile...