
我需要在乳膠中建立一個目錄,其中章節為羅馬數字,部分為阿拉伯數字,小節為字母。我還需要它只達到小節等級。
它應該看起來像這樣:
I. CHAPTER
II. CHAPTER
1. Section
2. Section
(a) Subsection
(b) Subsection
我使用以下命令產生目錄,但它使用另一種格式。
\tableofcontents
我該如何用乳膠實現這一目標?
特德.
答案1
您可以重新定義指令\thechapter
、\thesection
,\thesubsection
它們控制章節、節和小節的計數器的表示。然後可以使用該tocloft
包添加點:
\documentclass{book}
\usepackage{tocloft}
\renewcommand\cftchapaftersnum{.}
\renewcommand\cftsecaftersnum{.}
\renewcommand\thechapter{\Roman{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{(\alph{subsection})}
\begin{document}
\tableofcontents
\chapter{Test Chapter One}
\section{Test Section One}
\section{Test Section One}
\subsection{Test Subsection A}
\subsection{Test Subsection B}
\end{document}
可能需要進行一些其他調整,以防止章節編號與標題重疊,並可能減少章節編號與其標題之間的空間;這些調整可能類似於:
\renewcommand\cftchapnumwidth{2.8em}
\renewcommand\cftsecnumwidth{2em}
\renewcommand\cftsecindent{3em}
\renewcommand\cftsubsecindent{5em}