8

Why does using \AtEndDocument{\printbibliography} cause the following warning?

LaTeX Warning: There were undefined references.

Package biblatex Warning: Please rerun LaTeX.

Just to clarify: The references are displayed exactly like they should be. I'm just wondering why this warning is issued.

MWE:

\documentclass{book}

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\AtEndDocument{\printbibliography}

\begin{document}

    \cite{knuth:ct:c}

\end{document}

Note:

In case one wonders why this complicated syntax and not just using \printbibliography at the end of the document: This is just really convenient if used together with subfiles, see e.g. Bibliographies when using subfiles.

0
11

biblatex does a lot of cleaning up (also with respect to .aux files and warnings) in the \AtEndDocument hook. You don't get the warning if you issue

\AtEndDocument{\printbibliography}

before loading biblatex.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.