我这里有一个例子。我想删除第 1 章的索引,以便它以章节的索引开始。
但我想保留其他章节的索引。有人能帮我吗?谢谢。
\documentclass{report}
\begin{document}
\tableofcontents{}
\chapter{Editing compile}
\section{First Compile}
\subsection{Output formats}
\chapter{Document Structure}
\section{Reserved Characters}
\section{Reserved Characters abc}
\end{document}
答案1
以下操作似乎可以达到您想要的效果:
\documentclass{report}
\begin{document}
\tableofcontents
\renewcommand{\thesection}{\arabic{section}}% Section numbers should not include \thechapter
\chapter*{Editing compile}% Set unnumbered \chapter
\addcontentsline{toc}{chapter}{\protect\numberline{}Editing compile}% Put chapter in ToC (as if it's numbered)
\stepcounter{chapter}% Step regular chapter counter
\section{First Compile}
\subsection{Output formats}
\renewcommand{\thesection}{\thechapter.\arabic{section}}% Restore default (recursive) section numbering
\chapter{Document Structure}
\section{Reserved Characters}
\section{Reserved Characters abc}
\end{document}