How can I learn the horizontal distance between the chapter number and the chapter title both in ToC and the body text where I use \documentclass[12pt,reqno]{book}
. Which keys hold these values?
[Tex/LaTex] Space length between the chapter number and the chapter title
chapterssectioningspacingtable of contents
Best Answer
book
(likereport
) sets the ToC entry for a chapter using\l@chapter
. This is what it looks like:The specific thing to note here is the value of
\@tempdima
, set to1.5em
. The first argument of\l@chapter
(or#1
) uses\numberline
, which is defined in the kernellatex.ltx
as:creating a box of width
\@tempdima
and left-aligning its contents. Note that this1.5em
is based on the prevailing font at the time of setting (\normalsize\bfseries
by default).The (numbered) chapter head in
book
(andreport
) is set via the macro\@makechapterhead
. Here's a take on that:The space between the word
Chapter
(or\@chapapp
in the definition above) and the number (\thechapter
in the definition above) is a regular\space
or\
.
In both instances, if you want to change these defaults, you have at least 3 options:
Use a package that allows you to modify this content (like
titlesec
ortocloft
or the like);Copy the entire definition and change it to your liking (making
\newcommand
->\renewcommand
);Use
etoolbox
to patch the command. For example,would use a
5.5em
wide box for setting the chapter number in the ToC, increasing the gap between the number and title. Alsowould insert a
100pt
gap between the wordChapter
(or whatever\@chapapp
is) and the number.\ignorespaces
would just remove any trailing spaces left inside the original definition of\@makechapterhead
.