无论我重新运行 .tex 文件多少次,我都只收到最后一个警告:
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
然后我看到了这个问题答案的代码帮助我找到了正在改变的内容,就我而言,这是我在 .bib 文件中唯一的参考:
label memoir changed:
macro:->\hyper@@link [cite]{}{cite.memoir\@extra@b@citeb }{\@safe@activesfalse
Wilson e Madsen 2010}
macro:->\hyper@@link [cite]{}{cite.memoir}{Wilson e Madsen 2010}
对于导致此问题的原因或如何追踪此问题,您有什么想法吗?
编辑:
这是 MWE。我使用的是 abntex2 包(包含在 MiKTeX 中,它们是巴西的文档规则,也许错误就在这里),我的环境是:Windows + MiKTeX + Texmaker 编辑器。我的编译顺序是 PdfLaTeX + Bib(la)tex + PdfLaTeX + PdfLaTeX。
\documentclass[english,brazil]{abntex2}
\RequirePackage[alf]{abntex2cite}
% This code is just for diagnosis (see the question)
\makeatletter
\def\@testdef #1#2#3{%
\def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname
\reserved@a \else
\typeout{^^Jlabel #2 changed:^^J%
\meaning\reserved@a^^J%
\expandafter\meaning\csname #1@#2\endcsname^^J}%
\@tempswatrue \fi}
%
\begin{document}
\chapter{test}
\citeonline{memoir}
\bibliography{referencias}
\end{document}
我的 referencias.bib 包含:
@manual{memoir,
Address = {Normandy Park, WA},
Author = {Peter Wilson and Lars Madsen},
Date-Added = {2013-01-09 10:37:50 +0000},
Date-Modified = {2013-03-21 13:23:25 +0000},
Organization = {The Herries Press},
Title = {The Memoir Class for Configurable Typesetting - User Guide},
Url = {http://mirrors.ctan.org/macros/latex/contrib/memoir/memman.pdf},
Urlaccessdate = {19 dez. 2012},
Year = {2010},
Bdsk-Url-1 = {http://ctan.tche.br/macros/latex/contrib/memoir/memman.pdf}}
答案1
我在类中遇到了同样的问题abntex2
。出现警告的原因似乎是abntex2cite.sty
重新定义了来自 hyperref 的命令。我通过注释掉以下额外的定义\bibcite
修复了警告:\bibcite
abntex2cite.sty
(第 628 行:)
\ifthenelse{\boolean{ABNThyperref}}{%
%\renewcommand{\bibcite}[2]{% comment this line
% \@newl@bel{b}{#1}{\hyper@@link[cite]{}{cite.#1}{#2}}}% comment this line
\newcommand{\bibciteEXPL}[2]{%
\@newl@bel{b}{#1++EXPL}{\hyper@@link[cite]{}{cite.#1}{#2}}}%
\newcommand{\bibciteIMPL}[2]{%
\@newl@bel{b}{#1++IMPL}{\hyper@@link[cite]{}{cite.#1}{#2}}}%
\newcommand{\bibciteYEAR}[2]{%
\@newl@bel{b}{#1++YEAR}{\hyper@@link[cite]{}{cite.#1}{#2}}}%
}{}
我没有注意到生成的 pdf 文件有任何区别。