47.11 LaTeX Table of Contents

20201105

We can adjust the chapter or section numbers of a document:

\addtocounter{chapter}{10}    % Add 10 to the current chapter counter.

When we get more than 100 chapters then the layout of the contents pages needs some tuning as the three digit chapter numbers begin overlapping the chapter titles. The package supports such fine tuning. The following are a good set of sizes for books with 100 or more chapters.

\usepackage{tocloft}

\renewcommand\cftchapnumwidth{2em}    % Space for the chapter numbers.
\renewcommand\cftsecindent{2em}       % Indent for the section entry.
\renewcommand\cftsecnumwidth{3.2em}   % Space for the section numbers.
\renewcommand\cftsubsecindent{5.2em}  % Indent for subsection.
\renewcommand\cftsubsecnumwidth{4em}  % Space for subsection numbers.


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0