
Estoy escribiendo un documento con la book
clase y un \thechapter
comando redefinido. Como tengo muchos capítulos, el número del capítulo y el título del capítulo se superponen en el TOC. ¿Cómo puedo cambiar el espacio horizontal entre ellos? Sólo he visto soluciones que no funcionan para la book
clase.
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}
Respuesta1
Intente reservar algo de espacio para los números con antelación \setlength{\cftchapnumwidth}{3em}
, por ejemplo, después de cargar el tocloft
paquete.
\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}