책의 장 번호와 제목 사이의 가로 간격

책의 장 번호와 제목 사이의 가로 간격

book클래스와 재정의된 명령을 사용하여 문서를 작성 중입니다 \thechapter. 챕터가 많아서 TOC에서 챕터 번호와 챕터 제목이 겹칩니다. 그들 사이의 수평 공간을 어떻게 변경할 수 있습니까? 나는 수업에 효과가 없는 해결책만을 보았습니다 book.

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}

답변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}

관련 정보