UK TeX FAQ -- question label tocloft

### The format of the Table of Contents, etc.

The formats of entries in the table of contents (TOC) are controlled by a number of internal commands (discussed in section 2.3 of The LaTeX Companion - see TeX books). The commands `\``@pnumwidth`, `\``@tocrmarg` and `\``@dotsep` control the space for page numbers, the indentation of the right-hand margin, and the seperation of the dots in the dotted leaders, respectively. The series of commands named `\``l@xxx`, where `xxx` is the name of a sectional heading (such as `chapter` or `section`, ...) control the layout of the corresponding heading, including the space for section numbers. All these internal commands may be individually redefined to give the effect that you want.

Alternatively, the package tocloft provides a set of user-level commands that may be used to change the TOC formatting. Since exactly the same mechanisms are used for the List of Figures and List of Tables, the layout of these sections may be controlled in the same way.

The KOMA-Script classes provides an optional variant structure for the table of contents, and calculates the space needed for the numbers automatically. The memoir includes the functionality of tocloft.

`KOMA script bundle`
  macros/latex/contrib/koma-script (zip, browse)
`memoir.cls`
  macros/latex/contrib/memoir (zip, browse)
`tocloft.sty`
  macros/latex/contrib/tocloft (zip, browse)

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tocloft