
Я пишу документ с book
классом и переопределенной \thechapter
командой. Поскольку у меня много глав, номер главы и название главы в TOC пересекаются. Как изменить горизонтальное пространство между ними? Я видел только решения, которые не работают для класса book
.
МВЭ:
\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}
решение1
Постарайтесь заранее зарезервировать место для цифр \setlength{\cftchapnumwidth}{3em}
, например, после загрузки tocloft
посылки.
\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}