The "\contentslabel
" spacing specifications of ToC entries are governed by \@dottedtocline
. And, even though titletoc
allows for global modification of these, it doesn't allow an easy interface for modifying only certain parts of it. As such, here's a work-around: Modify \@dottedtocline
directly.
For article
:
\section
(level 1): Indent = 0pt
; label width = 1.5em
\subsection
(level 2): Indent = 1.5em
; label width = 2.3em
\subsubsection
(level 3): Indent = 3.8em
; label width = 3.2em
\paragraph
(level 4): Indent = 7.0em
; label width = 4.1em
\subparagraph
(level 5): Indent = 10.0em
; label width = 5.0em
For book
and report
:
\chapter
(level 0): Indent = 0pt
; label width = 1.5em
\section
(level 1): Indent = 1.5em
; label width = 2.3em
\subsection
(level 2): Indent = 3.8em
; label width = 3.2em
\subsubsection
(level 3): Indent = 7.0em
; label width = 4.1em
\paragraph
(level 4): Indent = 10.0em
; label width = 5.0em
\subparagraph
(level 5): Indent = 12.0em
; label width = 6.0em
Note how the indent of level X is equivalent to the sum of label widths of levels (X-1), (X-2), ... (...except for levels 4 and 5). This allows horizontal alignment between levels in the ToC. So, if you wish to reduce the space of the contents label at the \section
level in article
to be only 1em
, you can use
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\l@section}{1.5em}{1.0em}{}{}% Patch \section label width
\renewcommand*\l@subsection{\@dottedtocline{2}{1.0em}{2.3em}}% Correct \subsection indent
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.3em}{3.2em}}% Correct \subsubsection indent
\renewcommand*\l@paragraph{\@dottedtocline{4}{6.5em}{4.1em}}% Correct \paragraph indent
\renewcommand*\l@subparagraph{\@dottedtocline{5}{10.6em}{5em}}% Correct \subparagraph indent
\makeatletter
Again, note that the modification is required across all levels below \section
to ensure that the ToC is properly aligned horizontally.
Finally, similar indentations and widths are included in the LoF and LoT, all at the section level (1) by default. For consistency, you might wish to change these as well, using a similar approach as above. The definitions of interest are
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\let\l@table\l@figure
in article
, book
and report
.
Ps: The use of etoolbox
to patch \l@section
is easier that performing a redefinition, since the structure of \l@section
differs from that of the lower-level \l@<section>
commands.