
単純な通常の\tableofcontents
コマンドを使用して目次を作成していますが、セクション番号とセクション タイトルの間の間隔が小さすぎることがわかりました。
どなたか、これを修正する方法を教えていただけませんか。私のドキュメントクラスは ですmemoir
。
答え1
目次のセクション番号の幅は と呼ばれる長さで定義されます\cftKnumwidth
。ここで はセクションレベル、つまり、などK
に置き換えられます。 で変更できます。例:chapter
section
\setlength
\setlength\cftsectionnumwidth{4em}
セクションを参照9.2.2 エントリの組版memoir
詳細についてはマニュアルを参照してください。
完全な例:
\documentclass{memoir}
% \setlength\cftsectionnumwidth{4em} % uncomment to see difference
\begin{document}
\tableofcontents
\chapter{A chapter}
\setcounter{section}{999} % just for this example
\section{A section}
\end{document}
または、bookクラスを使用している場合は、https://tex.stackexchange.com/a/336618/50702以下はTorbjørn T.氏のコメントです。
\documentclass{book}
% note you need the subfigure option if you are using the subfigure package
%\usepackage[subfigure]{tocloft}
\usepackage{tocloft}
\setlength\cftsecnumwidth{4em}
\begin{document}
\tableofcontents
\chapter{A chapter}
\setcounter{section}{999}
\section{A section}
\end{document}
答え2
目次に膨大な数字がある場合は、次の構文で、プリアンブルで\cftsetindents
コマンド ( texdoc memoir
、153 ページ) を使用して、数字の前後のスペースを制御できます。
\cftsetindents{
親切}{
インデント}{
幅}
どこ親切セクションレベル(例:サブセクション)インデントインデントの長さ(数字の前のスペース)と幅数字のためのスペースですそしてセクションタイトルの分離。
例えば:
\cftsetindents{section}{1em}{3em}