LaTeX/Tables of Contents and Lists of Figures

Basic Idea and general commands
Basic LaTeX provides ways to automatically generate a table of contents (ToC, ) and list of tables/figures (LoT,  /LoF,  ) based on the titles or captions. To typeset a table of contents (or LoT/LoF) LaTeX needs helper files; that means every ToC update needs at least two LaTeX runs.



For the article class, those lists are unnumbered sections internally. For the standard report and book class, they are unnumbered chapters; each starting on a new page.

Unnumbered chapters and sections do not appear in the table of contents by default. How to get them to appear.

A table of contents has a depth. By default, three sectioning levels are present in the table of contents. You can specify to which level the ToC should show details.

Different titles for the document and the list
The sectioning commands, as well as, provide an optional argument that can take a different title. Usually, this is used to give a shorter caption for the ToC or LoF/LoT.



A table of contents for each chapter
Package  can get you a table of contents for single chapters. Following a small example.



Customizing the table of contents
If you want to customize your table of contents, you can choose from a few packages for the standard classes. However,  and have built-in methods to customize, using packages breaks functionality of the classes.

Numbers overlap the titles
LaTeX uses a defined space for entries in the table of contents, which means that long chapter or section numbers sometimes overlap the title. One easy solution is to override this by adding  to the preamble. Using a dedicated package for ToC customization might be better, though.