arxiv 编译中的警告:LaTeX 警告:标签可能已更改。重新运行以获取正确的交叉引用

arxiv 编译中的警告:LaTeX 警告:标签可能已更改。重新运行以获取正确的交叉引用

我正在尝试上传一份 pdfLaTex 文档https://arxiv.org/。编译后,我注意到以下情况。

LaTeX 警告:标签可能已更改。请重新运行以获取正确的交叉引用。

我的代码除了这种警告外,其他都很好。我从中了解到以下事实网站

第一次运行 LaTeX 时,它会记录下所有标签和参考文献,并将这些信息放入辅助文件中,然后您需要再次运行 LaTeX,而无需更改源 tex 文件,以便 LaTeX 从辅助文件中获取信息并理清哪些是参考文献。

但是 arxiv 编译器只运行一次代码。这意味着每次我运行代码时,它都会显示相同的警告。

问题:有办法解决这个问题吗?

就像重新编译两次相同的代码。

我在 arxiv 上运行的示例代码得到了相同的警告:

\pdfminorversion=4
\documentclass{amsart}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\title{Sample File}
\author{}
\date{}

\usepackage{amsthm}

\RequirePackage[bookmarks, bookmarksopen=true, plainpages=false, pdfpagelabels, pdfpagelayout=SinglePage]{hyperref}
\usepackage[nameinlink, noabbrev,capitalize]{cleveref}
\usepackage{xcolor}
\hypersetup{
    colorlinks,
    linkcolor={red!50!black},
    citecolor={red!50!black},
    urlcolor={red!80!black}
}


\newtheorem{theorem}{Theorem}


\begin{document}

\maketitle

\section{Introduction}
\begin{theorem}
Statement of the theorem. \label{Theorem1}
\end{theorem}
\begin{proof}
Here is the proof of \Cref{Theorem1}. See \cite{book}
\end{proof}

\begin{theorem}
Statement of the theorem. \label{theorem2}
\end{theorem}
\begin{proof}
Here is the proof of \hyperref[theorem2]{Theorem 2}.
\end{proof}
\bibliographystyle{alpha}
\bibliography{bibliography.bib}


\end{document}

Highlighted AutoTeX Log:

[verbose]: Creating arXiv submission AutoTeX object
[verbose]: *** Using TeX Live 2020 ***
[verbose]: Calling arXiv submission AutoTeX process
[verbose]: TeX/AutoTeX.pm: admin_timeout = minion
[verbose]: <main.tex> is of type 'LATEX2e'.
[verbose]: <bibliography.bib> is of type 'BiBTeX'.
[verbose]: <main.bbl> is of type 'TeX auxiliary'.
[verbose]: ~~~~~~~~~~~ Processing file 'main.tex'
[verbose]: TEXMFCNF is unset.
[verbose]: ~~~~~~~~~~~ Running latex for the first time ~~~~~~~~
[verbose]: Running: "(export HOME=/tmp PATH=/texlive/2020/bin/arch:/bin; cd /submissions/4345876/ && latex 'main.tex' < /dev/null)" 2>&1
[verbose]: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-09-06>
(/texlive/2020/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2020/05/29 v2.20.6
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/texlive/2020/texmf-dist/tex/latex/base/inputenc.sty)
(/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty
(/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)
(/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
(/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
(/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/texlive/2020/texmf-config/tex/latex/latexconfig/hyperref.cfg)
(/texlive/2020/texmf-dist/tex/latex/url/url.sty)
(/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty
(/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty))
(/texlive/2020/texmf-dist/tex/latex/hyperref/hdvips.def
(/texlive/2020/texmf-dist/tex/latex/hyperref/pdfmark.def
(/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty)
(/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))))
(/texlive/2020/texmf-dist/tex/latex/cleveref/cleveref.sty)
(/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty
(/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def))
(/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file main.aux.
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsb.fd)
(/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty
(/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty)
(/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.


LaTeX Warning: Reference `Theorem1' on page 1 undefined on input line 34.


LaTeX Warning: Citation `book' on page 1 undefined on input line 34.


LaTeX Warning: Hyper reference `theorem2' on page 1 undefined on input line 41.


(./main.bbl) [1] (./main.aux)

Package rerunfilecheck Warning: File `main.out' has changed.
(rerunfilecheck) Rerun to get outlines right
(rerunfilecheck) or use package `bookmark'.


LaTeX Warning: There were undefined references.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

)
Output written on main.dvi (1 page, 4112 bytes).
Transcript written on main.log.

[verbose]: ~~~~~~~~~~~ Running latex for the second time ~~~~~~~~
[verbose]: Running: "(export HOME=/tmp PATH=/texlive/2020/bin/arch:/bin; cd /submissions/4345876/ && latex 'main.tex' < /dev/null)" 2>&1
[verbose]: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-09-06>
(/texlive/2020/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2020/05/29 v2.20.6
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/texlive/2020/texmf-dist/tex/latex/base/inputenc.sty)
(/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty
(/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)
(/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
(/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
(/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/texlive/2020/texmf-config/tex/latex/latexconfig/hyperref.cfg)
(/texlive/2020/texmf-dist/tex/latex/url/url.sty)
(/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty
(/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty))
(/texlive/2020/texmf-dist/tex/latex/hyperref/hdvips.def
(/texlive/2020/texmf-dist/tex/latex/hyperref/pdfmark.def
(/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty)
(/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))))
(/texlive/2020/texmf-dist/tex/latex/cleveref/cleveref.sty)
(/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty
(/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def))
(/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./main.aux)
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/texlive/2020/texmf-dist/tex/latex/amsfonts/umsb.fd)
(/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty
(/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty)
(/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))
(./main.out) (./main.out) (./main.bbl) [1] (./main.aux) )
Output written on main.dvi (1 page, 5060 bytes).
Transcript written on main.log.

[verbose]: Removing (La)TeX AUX file called 'main.aux' (1654679218 >= 1654679217)
[verbose]: Removing (La)TeX AUX file called 'main.out' (1654679218 >= 1654679217)
[verbose]: ~~~~~~~~~~~ Processing file 'main.dvi'
[verbose]: Running: "(export HOME=/tmp PATH=/texlive/2020/bin/arch:/bin; cd /submissions/4345876/ && dvips -R2 -z 'main.dvi' -o )" 2>&1
[verbose]: dvi(h)ps said ...
This is dvips(k) 2020.1 Copyright 2020 Radical Eye Software (www.radicaleye.com)
' TeX output 2022.06.08:0906' -> main.ps
</texlive/2020/texmf-dist/dvips/base/texc.pro>
</texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro>
</texlive/2020/texmf-dist/dvips/base/texps.pro>
</texlive/2020/texmf-dist/dvips/base/special.pro>
</texlive/2020/texmf-dist/dvips/base/color.pro>
</texlive/2020/texmf-dist/dvips/base/hps.pro>.
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmti8.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb>[1]
<./head.tmp><./body.tmp>
.
[verbose]: Backing up 'main.ps'. Going to change %%Title line.
[verbose]: %%Title: line found and changed.
[verbose]: Title change completed.
[verbose]: Backing up 'main.ps'. Going to add a name/date stamp to it.
[verbose]: OK, inserting the stamp
[verbose]: Stamping completed.
[verbose]: All done.

[verbose]: AutoTeX process succeeded
[verbose]: Processing DVI
[verbose]: Gzipping and moving main.dvi
[verbose]: Gzipping ...4345876/main.dvi
[verbose]: Processing postscript
[verbose]: Creating AutoTeX file for bibliography.bib
[verbose]: Creating AutoTeX file for main.bbl
[verbose]: Creating AutoTeX file for main.dvi
[verbose]: Creating AutoTeX file for main.dvi.gz
[verbose]: Creating AutoTeX file for main.ps
[verbose]: Creating AutoTeX file for main.tex
[verbose]: Gzipping ...4345876/main.ps
[verbose]: Moving .../4345876/main.ps.gz => .../4345876/tex_cache/4345876.ps.gz

[verbose]: Moving .../4345876/main.dvi.gz => .../4345876/tex_cache/4345876.dvi.gz

[verbose]: All generated files successfully moved.
[verbose]: ** AutoTeX job completed. **

答案1

TLDR:这是一类在第一次运行中总是可以忽略的警告。

arXiv 至少处理两次(如果第一次成功),最多处理四次。如果您使用任何文档内\ref-type 命令,此警告将始终出现在第一次 tex 传递中;\cite如果您没有在括号中提供 alt-tex,则在所有 -type 命令中都会出现此警告。如果您阅读第二次传递,您会注意到这种情况没有再次发生,因为引用和参考文献现在已在.aux系统生成的文件中解析。

原因是:即使您将文件作为包的一部分上传,它也会被 autotex 忽略(并删除),并且由于文件尚未填充,.aux因此交叉引用/引文将不会在第一遍中链接。.aux

相关内容