How to Rerun Biber on a LaTeX File
At a glance
- 1. Compile LaTeX once
Run LaTeX on your main .tex file to create the Biber control file, usually named main.bcf.
- 2. Run Biber
In the project directory, run biber followed by the main document’s basename, without the .tex extension.
- 3. Compile LaTeX again
Run LaTeX at least once more so it reads Biber’s bibliography output and updates citations.
- 4. Repeat if needed
If LaTeX reports unresolved citations or references, compile it again until the warnings disappear.
To rerun Biber, use the name of your main LaTeX document, not the name of the .bib database. For a file named main.tex, the usual sequence is to compile main.tex, run biber main, and compile main.tex again.
This sequence applies when your document uses biblatex with Biber as its backend. The first LaTeX run creates a .bcf control file. Biber reads that file and writes bibliography data to a .bbl file. Later LaTeX runs use the .bbl file to format the bibliography and resolve citations.
The command-line sequence
Open a terminal in the directory containing your main .tex file, then run:
pdflatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex
Replace pdflatex with the LaTeX engine you use, such as xelatex or lualatex. The final LaTeX run is sometimes enough, but a second run is commonly needed to settle cross-references and citation labels.
The argument to Biber is usually the basename of the main document. If the file is thesis.tex, use biber thesis; Biber will look for thesis.bcf in the current directory. Don’t pass the bibliography database, such as references.bib, as the argument. If the main file is in another directory, either change to that directory first or provide the appropriate path to its basename.
A minimal working example
Save this as main.tex:
\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
\begin{document}
A sample citation: \parencite{smith2020}.
\printbibliography
\end{document}
Save this as references.bib in the same directory:
@book{smith2020,
author = {Smith, Jane},
title = {An Example Book},
year = {2020},
publisher = {Example Press}
}
Here, backend=biber tells biblatex to use Biber, and \addbibresource names the .bib database. Compile in this order:
pdflatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex
The first LaTeX run needs to happen before Biber because it creates main.bcf. Biber then processes the citation and bibliography data. The subsequent LaTeX runs produce the formatted bibliography and update citation links and labels.
Rerunning Biber in an editor
Most LaTeX editors let you select a build command or tool. Configure the sequence as LaTeX → Biber → LaTeX → LaTeX, making sure the Biber step targets the main document’s basename. Some editors provide a dedicated Biber command; others require you to edit a build recipe. If you use a hosted editor, its build system may run Biber automatically after it detects the .bcf file.
You can also use latexmk to automate the sequence. For example, latexmk -pdf main.tex typically detects the Biber dependency and runs the required tools. For a different engine, use the corresponding latexmk option, such as -xelatex or -lualatex.
Common mistakes
- Running Biber before LaTeX: Biber needs the
.bcffile, which the initial LaTeX run creates. If that file is missing, compile the main document first. - Using the wrong name: Run
biber mainformain.tex, notbiber referencesforreferences.bib. Also check that you are in the directory containing the.bcffile. - Using BibTeX instead: A document configured with
backend=biberneeds Biber, not BibTeX. Conversely, an older document set up for BibTeX should not be switched to Biber merely by changing the command; its bibliography configuration may need to change too. - Expecting one LaTeX run to finish everything: The first run after Biber may still report unresolved citations or references. Run LaTeX again, and inspect the log if warnings remain.
- Trying to run Biber when there are no citations or bibliography setup: Check that
biblatexis loaded,backend=biberis set, and the document contains citations or a bibliography command such as\printbibliography.
If the sequence still fails, check the LaTeX log for errors and confirm that the .bcf and .bib files are in the expected locations. A stale auxiliary file can sometimes interfere; after saving a backup, clean the generated auxiliary files and rebuild from the first LaTeX run.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.