O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required