LaTeX warning "Empty bibliography": cause and fix
\printbibliography had no entry to print, so the bibliography and its heading are missing from the PDF. With BibTeX, LaTeX warns about an empty thebibliography environment in the same situation.
Why it happens
- The document cites nothing yet.
biblatexlists only entries that are cited. - Biber has not run, or LaTeX has not run again after it. The warning then appears together with Please (re)run Biber on the file: main and rerun LaTeX afterwards.
- None of the cited keys exists in the
.bibfile, so Biber found no entry. - A filter matches nothing, for example
\printbibliography[type=article]when no article is cited.
How to fix it
- Cite at least one entry with
\cite{key}. - To list entries without citing them, use
\nocite{key}, or\nocite{*}for the whole.bibfile. - Run LaTeX, Biber and LaTeX again.
- Check the keys and the filter options of
\printbibliography.
A document that produces the message
\documentclass{article}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
Text without a citation.
\printbibliography
\end{document}File refs.bib:
@book{knuth1984,
author = {Donald E. Knuth},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1984}
}Tools run in this order: pdflatex → biber → pdflatex.
The corrected document
\documentclass{article}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
Text without a citation.
\nocite{*}
\printbibliography
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.