我收到以下警告,并设法弄清楚这些是由于hyperref
包和命令\tableofcontents
、\listoftables
和之间的一些相互作用造成的\listoffigures
(该命令\afterpreface
本质上是\tableofcontents
、\listoftables
和\listoffigures
)。我将\hyperref
包作为我在序言中添加的最后一个包,并具有以下选项:
\usepackage[plainpages=false,pdfpagelabels]{hyperref}
我该如何消除这些警告?
(/usr/share/texmf/tex/latex/lm/omslmr.fd)pdfTeX warning (ext4): destination wit
h the same identifier (name{page.}) has been already used, duplicate ignored
<to be read again>
\relax
l.125 \afterpreface
[1] (./temp.toc)pdfTeX warning (ext4): destina
tion with the same identifier (name{page.}) has been already used, duplicate ig
nored
<to be read again>
\relax
l.125 \afterpreface
[2] (./temp.lot)pdfTeX warning (ext4): destina
tion with the same identifier (name{page.}) has been already used, duplicate ig
nored
<to be read again>
\relax
l.125 \afterpreface
[3] (./temp.lof
Underfull \vbox (badness 2189) has occurred while \output is activepdfTeX warni
ng (ext4): destination with the same identifier (name{page.}) has been already
used, duplicate ignored
<to be read again>
\relax
l.12 ...sponds to $10^4$ sec/m.}}{28}{figure.2.10}
[4])pdfTeX warning (ext4): d
estination with the same identifier (name{page.}) has been already used, duplic
ate ignored
<to be read again>
\relax
l.125 \afterpreface
[5]pdfTeX warning (ext4): destination with the same identi
fier (name{page.}) has been already used, duplicate ignored
<to be read again>
\relax
答案1
您可能正在使用类似 的内容\pagenumbering{gobble}
。因为页码也用于目标和页面标签。如果您想在自动设置页面样式的页面上隐藏页码plain
(开始章节/目录/...的页面),那么您可以重新定义页面样式,plain
如“7 重新定义plain
样式”一节中所述包的文档fancyhdr
:
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{}% clear all header and footer fields
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
}
对于其他页面(标题页,...),可以使用页面样式。还可以使用empty
禁用页面锚点,然后重新启用。\hypersetup{pageanchor=false}
true