Time for action – refining an extensive table of contents
We shall build the frame of a document containing some headings. We will modify the automatically created table of contents to be finer and to contain additional entries.
In Chapter 3, Designing Pages, we saw the effect of \tableofcontents
. The entries have been collected from the headings. We shall use this down to the subsubsection level.
Then we shall extend the TOC further. We will manually add entries for some headings:
- Create a new document with the following code:
\documentclass{book} \setcounter{tocdepth}{3} \begin{document} \tableofcontents \part{First Part} \chapter*{Preface} \addcontentsline{toc}{chapter}{Preface} \chapter{First main chapter} \section{A section} \section{Another ...
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.