
book
クラスと再定義されたコマンドを使用してドキュメントを作成しています\thechapter
。章が多数あるため、章番号と章タイトルが目次で重なっています。それらの間の水平スペースを変更するにはどうすればよいですか? クラスでは機能しないソリューションしか見たことがありません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}