BibTeX or biblatex: which to use, and how to set up each
Help centre › LaTeX › References and citations · Packages: biblatex, natbib
Use BibTeX when submitting to a journal that supplies a .bst style or a class that loads natbib: \bibliographystyle{plain} and \bibliography{refs}, then run bibtex. Use biblatex (with biber) when you choose the style yourself and want Unicode, flexible styles or several bibliographies: \usepackage[style=authoryear]{biblatex}, \addbibresource{refs.bib} and \printbibliography. Both read the same .bib file.
A complete example
A whole document: paste it into an empty project and compile it.
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
author = {Smith, Jane and Brown, Paul},
title = {Measuring Things Carefully},
journal = {Journal of Measurement},
year = {2020},
volume = {12},
pages = {1--10}
}
@book{garcia2018,
author = {Garcia, Maria and Chen, Wei and Okafor, Ngozi},
title = {Methods for Field Studies},
publisher = {University Press},
address = {Boston},
year = {2018}
}
\end{filecontents*}
\documentclass{article}
\begin{document}
Measurement matters \cite{smith2020}, as do field methods \cite{garcia2018}.
\bibliographystyle{plain}
\bibliography{refs}
\end{document}BibTeX: the classic setup
BibTeX is a separate program. LaTeX writes the cited keys to the .aux file; bibtex main reads them, formats the entries with the .bst style named in \bibliographystyle, and writes a .bbl file that LaTeX reads on the next compile. The order is pdflatex, bibtex, pdflatex, pdflatex.
Standard styles: plain (sorted, numbered), unsrt (in citation order), alpha (labels like [SB20]), abbrv; with natbib, plainnat, unsrtnat and abbrvnat for author-year. Journals supply their own .bst.
biblatex: the modern setup
biblatex formats the bibliography in LaTeX itself, and biber sorts and prepares the entries. The style is a package option, the .bib file is named with its extension, and the list is printed where you write \printbibliography. The order is pdflatex, biber, pdflatex, pdflatex.
\begin{filecontents*}[overwrite]{refs.bib}
@article{smith2020,
author = {Smith, Jane and Brown, Paul},
title = {Measuring Things Carefully},
journal = {Journal of Measurement},
year = {2020},
volume = {12},
pages = {1--10}
}
@book{garcia2018,
author = {Garcia, Maria and Chen, Wei and Okafor, Ngozi},
title = {Methods for Field Studies},
publisher = {University Press},
address = {Boston},
year = {2018}
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{refs.bib}
\begin{document}
Measurement matters \parencite{smith2020}, and \textcite{garcia2018} describe field methods.
\printbibliography
\end{document}Which to choose
- Submitting to a journal: follow its template. Most journal classes (elsarticle, IEEEtran, revtex, acmart) are built for BibTeX and a .bst, and many submission systems compile your source and expect a BibTeX .bbl.
- Thesis, book or your own layout: biblatex is easier to adjust — styles such as
authoryear,numeric,alphabetic,apaandieee, per-chapter bibliographies, and filtering by type or keyword, all without editing a .bst file. - Names and titles with accents or non-Latin scripts: biber reads UTF-8 throughout and sorts by language; BibTeX is limited to 8-bit text and can sort accented names oddly.
- Uploading the .bbl: a biblatex .bbl only works with the same biblatex version that wrote it, so a site that compiles your files with its own TeX may reject it. A BibTeX .bbl has no such tie.
Citing commands
BibTeX with the standard styles uses \cite; with natbib it adds \citep and \citet. biblatex has \cite, \parencite, \textcite, \autocite and \footcite, and accepts natbib's commands too when loaded with natbib=true.
biblatex with BibTeX as backend
\usepackage[backend=bibtex]{biblatex} runs biblatex with the bibtex program instead of biber. It loses Unicode sorting and some features; use it only where biber is not available.
Common mistakes
\addbibresource{refs.bib}needs the extension;\bibliography{refs}must not have it.- Do not combine biblatex with
\bibliographystyleor\bibliography, and do not load natbib alongside biblatex: passnatbib=trueto biblatex instead. - Running bibtex on a biblatex document, or biber on a BibTeX one, leaves every citation undefined. Check which program the document needs.
- Each entry key must appear once in the .bib file; a repeated key is skipped with a "Repeated entry" message.
- A missing comma or brace in one entry can make BibTeX skip it; the .blg log names the line.
In journal templates
- elsarticle loads natbib and expects BibTeX with
elsarticle-num(numbered) orelsarticle-harv(author-year). - IEEEtran uses BibTeX with the
IEEEtranstyle. - revtex loads natbib and uses BibTeX with its own APS and AIP styles.
- acmart uses BibTeX with
ACM-Reference-Formatby default.
Errors you may meet
- LaTeX Warning: Citation `<key>' on page <n> undefinedA \cite key has no entry in the built bibliography: a key typo, a missing \bibliography line, a broken .bib entry, or BibTeX has not run yet.
- I found no \bibdata commandBibTeX read the .aux file and found no \bibliography, no \cite or no \bibliographystyle. Add the missing command, or run biber for biblatex.
- I couldn't open database file <name>.bibBibTeX cannot find the .bib file named in \bibliography. Check the spelling and folder, and write the name without the .bib extension.
- Repeated entry---line <n> of file <name>.bibTwo .bib entries share one citation key. BibTeX keeps the first and skips the other. Delete the duplicate or give it its own key.
- I was expecting a `,' or a `}'---line <n> of file <name>.bibA .bib entry is malformed, most often a missing comma between fields or a space in the key. BibTeX skips the rest of the entry.
In Manulyx
Every compile runs latexmk, so BibTeX or biber and the extra passes happen as needed, with biber chosen automatically for a biblatex document. References you add through the References panel are written to the project's .bib file.
Write in Manulyx for free · Journal templates
Related
- Author-year citations in LaTeX with natbib: \citep and \citetCite author-year with natbib: \citet for Smith (2020), \citep for (Smith, 2020), page notes, et al., brackets, and author-year bibliography styles.
The examples on this page were compiled with pdfLaTeX and BibTeX to check that they work as shown. LaTeX quick reference · LaTeX errors explained