Tx · LaTeX & TikZ

Why Does LaTeX Keep Asking Me to Rerun It, and Why Is My Bibliography Wrong?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the backend

    For biblatex with Biber, set backend=biber and use biblatex commands to load and print the bibliography.

  2. 2. Run Biber

    Compile LaTeX once, then run Biber on the document basename so it can process citation data.

  3. 3. Compile again

    Run LaTeX twice more to update citations, cross-references, and the printed bibliography.

  4. 4. Inspect persistent warnings

    If the warning remains, check the log and Biber output for errors, missing keys, or an incorrect job name.

Advertisement

The message “Please rerun LaTeX” is usually a request to update information that changed during compilation, not an error by itself. When you use biblatex with Biber, LaTeX and Biber have to exchange information over several passes before citations and the bibliography settle.

There is no source code in the question to identify a specific typo, so the example below shows a reliable setup. It also illustrates the commands to use and the order in which to run them.

A minimal working example

Save this as main.tex and put a file named references.bib in the same folder. This example uses the authoryear bibliography style; other styles change how citations and entries are formatted.

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}

\begin{document}

A citation in the text: \cite{knuth1984}.

\printbibliography

\end{document}

The contents of references.bib can be:

@book{knuth1984,
  author    = {Knuth, Donald E.},
  title     = {The TeXbook},
  year      = {1984},
  publisher = {Addison-Wesley}
}

The citation key is knuth1984. It must match exactly in the \cite{knuth1984} command. The bibliography is printed where \printbibliography appears.

Compile in the right order

For a document called main.tex, the usual command-line sequence with pdfLaTeX is:

pdflatex main
biber main
pdflatex main
pdflatex main

Use the same LaTeX engine for both LaTeX runs. Biber takes the job name main, not the filename main.tex. The first LaTeX run writes citation information; Biber processes it and creates bibliography data; the following LaTeX runs incorporate that data and resolve references. An editor’s “Build” command can do these steps for you, but its bibliography backend must be set to Biber, not BibTeX.

If you use another engine, such as XeLaTeX or LuaLaTeX, run that engine in place of pdflatex for the LaTeX passes. Do not replace Biber with BibTeX while the document is configured with backend=biber.

Why the warning can keep returning

A request for another LaTeX run is expected after Biber has updated the bibliography data. It should normally go away after the full sequence. If it does not, check these common causes:

  • Biber was never run, or the editor ran BibTeX instead. Confirm that the build settings use Biber and that its run completes successfully.
  • Biber was run on the wrong name. For main.tex, the job name is normally main. If your main file has a different name, use that basename.
  • There are errors in the Biber output. Look for messages about missing citation keys, missing .bib files, or invalid entries. Fix the underlying problem, then run the full sequence again.
  • You changed citations or bibliography data after the last Biber run. Run Biber again, followed by LaTeX passes.
  • Old auxiliary files are confusing the build. If the sequence and settings are correct but the warning persists, use your editor’s command to clean auxiliary files, then rebuild from the beginning. Keep your .tex and .bib files; the generated files can be recreated.

The LaTeX log and Biber output are more useful than the warning alone. A message about rerunning LaTeX generally means the document needs another pass; an error in Biber’s output can explain why the bibliography data was not updated.

Why the bibliography may not display as expected

Check the setup as well as the appearance:

  1. Use biblatex commands consistently. Load the package with \usepackage[...]{biblatex}, add the database with \addbibresource{references.bib}, and print it with \printbibliography. Do not mix this setup with traditional BibTeX commands such as \bibliographystyle and \bibliography.
  2. Check the file and entry names. The resource path must point to the .bib file, and each citation key must match the key before the comma in its entry. For example, \cite{knuth1984} refers to @book{knuth1984, ...}.
  3. Check what you have asked to print. By default, \printbibliography prints cited entries. To print every entry in the database, add \nocite{*} before \printbibliography.
  4. Choose an appropriate style and provide the fields it uses. A bibliography style determines formatting and may sort entries differently. A missing author, title, date, or other field can make an entry look incomplete even when the compilation succeeds.

Common mistakes

A frequent mix-up is using \bibliography{references} with biblatex. That command belongs to the traditional BibTeX workflow. For biblatex, use \addbibresource{references.bib} in the preamble and \printbibliography in the document body.

Another common mistake is expecting an entry to appear just because it is in the .bib file. By default, only cited entries are printed. Add \nocite{*} only if you intend to print all entries, including those not cited in the text.

Finally, do not treat every rerun message as proof that the bibliography style is broken. First complete the LaTeX–Biber–LaTeX–LaTeX sequence and check the build logs. If a warning remains, its surrounding log messages usually point to a specific unresolved citation or build error.

References

  1. The biblatex Package Documentation
  2. Biber — A BibTeX replacement for users of biblatex

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.