I'm running a minimal, up-to-date TeX Live installation on Windows 11. I am trying to use biblatex and biber for bibliography management.
The problem I am experiencing is that I must run pdflatex thrice to clear all warnings. I know that this is expected behaviour for bibtex; but my understanding was that biblatex only requires a single pdflatex-biber-pdflatex run to work.
I have provided a MWE below with the contents of the two files, demo.tex and refs.bib:
demo.tex
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\begin{document}
According to Smith \cite{smith99}, blah blah blah.
\printbibliography
\end{document}
refs.bib
@book{smith99,
title = {Clever Book Title},
author = {John Smith},
publisher = {Smith Publishing},
year = {1999}
}
Here is my approach: I first run the command pdflatex demo.tex, and the terminal outputs these warnings:
LaTeX Warning: Citation 'smith99' on page 1 undefined on input line 6.
LaTeX Warning: Empty bibliography on input line 8.
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) demo
(biblatex) and rerun LaTeX afterwards.
Then, I run biber demo as instructed. There are no errors.
Then, I run pdflatex demo.tex again, only to see the following warnings:
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please rerun LaTeX.
Which is odd, as the output PDF looks fine - it has the in-text numeric citation as well as the bibliography.
When I run pdflatex demo.tex (for the third time), there are no warnings in the output.
This behaviour is consistent across trials. I have tried running pdflatex without the file extension (pdflatex demo); I have tried different keys instead of smith99; I have tried other source types such as online or article, all to no avail.
Both files are located in the folder C:\demo, and there are no other files in this directory. I have tried to isolate the problem as much as I possibly can, but biblatex tells me to rerun LaTeX every single time.
I have also tried running latexmk -pdf demo.tex, and it runs pdflatex-biber-pdflatex-pdflatex.
What is causing this problen? Any help is greatly appreciated. Thank you.
biblatexis: LaTeX, Biber, LaTeX, LaTeX. So you always need at least two LaTeX runs after biber. See https://tex.stackexchange.com/questions/63852/question-mark-or-bold-citation-key-instead-of-citation-number But note: Depending on the document and used packages, additional LaTeX runs could be needed (but usually not because of the bibiography). – cabohah Jun 07 '23 at 09:38latex-biber-latexwithout needing a thirdlatexrun, including this answer on Stack Exchange. – Richard Reichman Jun 07 '23 at 09:51pdflatex-biber-pdflatexthe aux file contains now\abx@aux@defaultrefcontext{0}{smith99}{nty/global//global/global}. Before that it does not contain that command. That command will make something defined at begin document on 3rd run only, without it\cite{smith99}will cause a command\blx@rerun@latexto be issued at end document. User is then prompted to rerun LaTeX. – user691586 Jun 07 '23 at 10:01pdflatex-biber-pdflatexwas enough (meaning that biblatex did not prompt user for a 3rd run of pdflatex). The structure of the biblatex instructions in the.auxfile is very different with the TL2013 context. biblatex has evolved since. I don't know when its internal refactorings induced the new behavior. – user691586 Jun 07 '23 at 10:09LaTeX Warning: There were undefined references.warning after the secondpdflatexrun, though. The references are clearly defined, as they appear in the PDF just fine. Would somebody mind running the MWE to confirm that this warning indeed does appear on other systems? – Richard Reichman Jun 07 '23 at 10:22smith99to be defined. At some point a check is made if that stuff is defined. Only if defined is no rerun prompt emitted later. – user691586 Jun 07 '23 at 10:36LaTeX Warning: There were undefined references.. Wheneverbiblatexdetects that a LaTeX rerun is required it issues a warning of the formPlease rerun LaTeX, but it will also activate\G@refundefinedtrue, which the LaTeX kernel uses to decide whether or not to print theLaTeX Warning: There were undefined references.. It has used this command from the kernel from the start. I'm assuming to make it easier for tools that analyse the.logfile to detect that a rerun is requested. ... – moewe Jun 08 '23 at 05:55