2

I am writing a document with the bookclass and a redefined \thechaptercommand. Since I have a lot of chapters, the chapter number and the chapter title overlap in the TOC. How can I change the horizontal space between them? I have only seen solutions that do not work for the bookclass.

MWE:

\documentclass{book}
\begin{document}
\tableofcontents
\renewcommand*{\thechapter}{I.\arabic{chapter}}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\end{document}
Martin
  • 511

1 Answers1

2

Try to reserve some space for the numbers in advance by \setlength{\cftchapnumwidth}{3em}, for example, after loading the tocloft package.

\documentclass{book}

\usepackage{tocloft}
\setlength{\cftchapnumwidth}{3em}

\begin{document}
\tableofcontents
\renewcommand*{\thechapter}{I.\arabic{chapter}}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\chapter{AAA}
\end{document}
AboAmmar
  • 46,352
  • 4
  • 58
  • 127