如何更改目录中 \section \subsection 的缩进,使它们与章节标题的缩进对齐?我使用的是书籍类格式。
我的代码如下所示
\renewcommand*{\contentsname}{\normalsize Table of Contents}
{\tableofcontents}
\addcontentsline{toc}{chapter} {\trjnfamily{\fontsize{13pt}{13pt}\selectfont PART I THE CODEX AND ITS HISTORY}}
\chapter* {\trjnfamily{\fontsize{18pt}{18pt}\selectfont PART I\\ THE CODEX AND ITS HISTORY}}
\renewcommand{\chaptername}{{\large }}
\include{chapter1} %Physical description
\include{chapter2} %Provenance
\addcontentsline{toc}{chapter}{\trjnfamily{\fontsize{13pt}{13pt}\selectfont PART II LITERARY SOURCES}}
\chapter* {\trjnfamily{\fontsize{18pt}{18pt}\selectfont PART II\\ LITERARY SOURCES}}\
\include{chapter3}%Links
\include{chapter4}%Conventions
\addcontentsline{toc}{chapter}{\trjnfamily{\fontsize{13pt}{13pt}\selectfont
PART III INTERPRETING TEXT AND IMAGE}}
\chapter* {\trjnfamily{\fontsize{18pt}{18pt}\selectfont PART III\\ INTERPRETING THE TEXT}}
\include{chapV}
\include{chapW}
\include{chapY}
答案1
您可以使用包tocflat
选项tocstyle
:
\documentclass{book}
\usepackage{blindtext}
\usepackage[tocflat]{tocstyle}
\usetocstyle{standard}
\begin{document}
\tableofcontents
\Blinddocument
\Blinddocument
\end{document}
使用tocloft
,你可以使用
\cftsetindents{<entry>}{<indent>}{<numwidth}
这里entry
是chapter
,section
等,<indent>
是缩进,<numwidth>
是为排版条目编号保留的宽度。
\documentclass{book}
\usepackage{blindtext}
\usepackage{tocloft}
\cftsetindents{chapter}{0pt}{3em}
\cftsetindents{section}{0pt}{3em}
\cftsetindents{subsection}{0pt}{3em}
\begin{document}
\tableofcontents
\Blinddocument
\Blinddocument
\end{document}