我想隐藏 revtex4 文档目录中的附录部分。我知道 revtex4 包会覆盖与 toc 相关的标准命令。在这种情况下我该怎么办?谢谢!
\documentclass{revtex4}
\begin{document}
% Title page
\title{My Document}
\author{Me}
\maketitle
% Table of contents
\tableofcontents
% Sections and subsections
\section{Introduction}
This is the introduction.
\subsection{Background}
This is the background.
\subsubsection{Details}
This is the subsubsection.
\section{Method}
This is the method.
% Appendix
\appendix
\section{Appendix}
This is the first appendix section.
\section{Another Appendix Section}
This is another appendix section.
\end{document}
上面是一个代码示例。我想在目录中隐藏“A 附录”和“B 另一个附录部分”。如果可能的话,我想用“附录”替换它们以表示所有附录部分
答案1
您可以使用的方法revtex4
来忽略附录中的内容。但是对于小节,它将失败。
我使用revtex4-2
,因为revtex4
已经过时了。
\documentclass{revtex4-2}
\begin{document}
% Title page
\title{My Document}
\author{Me}
\maketitle
% Table of contents
\tableofcontents
% Sections and subsections
\section{Introduction}
This is the introduction.
\subsection{Background}
This is the background.
\subsubsection{Details}
This is the subsubsection.
\section{Method}
This is the method.
\subsection{Background}
This is the background.
\subsubsection{Details}
This is the subsubsection.
% Appendix
\appendix
\addtocontents{toc}{\string\tocdepth@munge}
\section{Appendix}
This is the first appendix section.
\section{Another Appendix Section}
This is another appendix section.
\end{document}
无论如何,这与 的工作原理相同revtex4
。