MiKTeX - 未定义的参考和引文,但 PDF 呈现

MiKTeX - 未定义的参考和引文,但 PDF 呈现

运行哪怕是最简单的代码时,我总会收到未定义引用/引文的警告。我在 Windows 机器上运行 TeXworks(与 MiKTeX 一起下载):MiKTeX-pdfTeX 4.3 (MiKTeX 21.1)。这是一个 MWE(main.tex):

\documentclass[12pt]{article}

\begin{document}

\section{Introduction} \label{sec:Intro}
This is the Introduction. 
Section \ref{sec:sec2} is the second section. Section \ref{sec:sec3} is the third section.

\section{Second} \label{sec:sec2}
This is the second section. Here, we cite \cite{Goodwin}.

\section{Third} \label{sec:sec3}
This is the third section. Here, we cite \cite{TVG, Survey}.

\bibliographystyle{ieeetr}
\bibliography{refs}

\end{document}

我的 BiBTeX 文件如下(refs.bib):

@BOOK{Goodwin,
author = {Goodwin, G. C. and Sin, K. S.},
title = {Adaptive Filtering Prediction and Control},
publisher = {Dover Publications},
year = {1984}
}

@ARTICLE{TVG,
author = {Moore, K. L. and Chen, Y.-Q. and Bahl, V.},
title = {Monotonically convergent iterative learning control for linear discrete-time systems},
journal = {Automatica},
year = {2005},
volume = {41},
number = {9},
pages = {1529--1537}
}

@ARTICLE{Survey,
author = {Bristow, D. A. and Tharayil, M and Alleyne, A. G.},
title = {{A Survey of Iterative Learning Control}},
journal = {IEEE Control Systems Magazine},
year = {2006},
volume = {26},
number = {3},
pages = {96--114}
}

pdfLaTeX+MakeIndex+BibTeX当我在 TeXworks 中使用该选项排版此文件时(该refs.bib文件正在使用该BibTeX选项运行),我收到以下警告:

LaTeX Warning: Reference `sec:sec2' on page 1 undefined on input line 6.
LaTeX Warning: Reference `sec:sec3' on page 1 undefined on input line 6.
LaTeX Warning: Citation `Goodwin' on page 1 undefined on input line 9.
LaTeX Warning: Citation `TVG' on page 1 undefined on input line 12.
LaTeX Warning: Citation `Survey' on page 1 undefined on input line 12.
LaTeX Warning: There were undefined references.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
LaTeX Warning: Citation `Goodwin' on page 1 undefined on input line 9.
LaTeX Warning: Citation `TVG' on page 1 undefined on input line 12.
LaTeX Warning: Citation `Survey' on page 1 undefined on input line 12.
LaTeX Warning: There were undefined references.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

工作文件夹中未生成任何 .aux 文件。

尽管多次重新运行main.texrefs.bib,这些警告并没有消失。令人惊讶的是,PDF 呈现完美,并且没有缺少引用或交叉引用(即,没有问号代替引用/交叉引用)。当我尝试main.tex仅使用该pdfLaTeX选项运行时,交叉引用的警告在运行两次后消失,但引用的警告仍然存在:

LaTeX Warning: Citation `Goodwin' on page 1 undefined on input line 9.
LaTeX Warning: Citation `TVG' on page 1 undefined on input line 12.
LaTeX Warning: Citation `Survey' on page 1 undefined on input line 12.
LaTeX Warning: There were undefined references.

在这种情况下,工作文件夹中会生成一个.aux 文件。

我尝试refs.bib将 的选项改为pdfLaTeX+MakeIndex+BibTeX,但没有帮助。没有简单的LaTeX编译选项。

我觉得这个问题是,但在我的例子中使用的是 TeXworks,而不是 TeXMaker。这个问题已经困扰了我一段时间,但我没有找到合适的解决方法。虽然 PDF 可以正确呈现,但我不想收到这些警告,因为文档的编译时间要长得多。

相关内容