我使用的 mwe 是:
\documentclass[12pt,a4paper]{revtex4-1}
\usepackage{graphicx}% Include figure files
\usepackage{bm}% bold math
\usepackage[usenames]{color}
\usepackage[all]{xy}
\usepackage{amsmath}
\usepackage{fixmath}
\usepackage{natbib}
\usepackage{placeins}
\usepackage{verbatim}
\usepackage[top=0.59in,bottom=0.59in,left=0.59in,right=0.59in]{geometry}
%% packges not from aps
\usepackage{amssymb}
\usepackage{float}
\usepackage[nice]{nicefrac}
\usepackage{chemmacros}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{multirow}
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = red, %Colour for external hyperlinks
linkcolor = black, %Colour of internal links
citecolor = black %Colour of citations
}
\setlength{\parindent}{0pt}
\setlength{\abovecaptionskip}{0pt plus 0pt minus 0pt}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\alph{subsection}}
\def\bibsection{\section{\refname}}
\begin{document}
\tableofcontents
\setcounter{page}{1}
\newpage
\section{section 1}
bla bla bla
\newpage
\section{section 2}
bla bla bla
\newpage
\section{section 3}
bla bla bla
\newpage
\section{section 4}
bla bla bla
\end{document}
答案1
您可以使用以下开关来更改目录中显示的内容:
\droptocpage
:从此时起删除目录中的页面引用;\incltocpage
:从此时起恢复目录中的页面引用。
\documentclass{revtex4-1}
\usepackage{hyperref}
\renewcommand{\thesection}{\arabic{section}}% Just for this example
\AtBeginDocument{\let\oldcontentsline\contentsline}
\newcommand{\notoccontentsline}[4]{\oldcontentsline{#1}{#2}{}{#4}}
\newcommand{\droptocpage}{\addtocontents{toc}{\let\protect\contentsline\protect\notoccontentsline}}
\newcommand{\incltocpage}{\addtocontents{toc}{\let\protect\contentsline\protect\oldcontentsline}}
\begin{document}
\tableofcontents
\clearpage
\section{First section}
bla bla bla
\clearpage
\section{Second section}
bla bla bla
\clearpage
\droptocpage
\section{Third section}
bla bla bla
\clearpage
\incltocpage
\section{Fourth section}
bla bla bla
\end{document}