Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 38 ยท Cross-references and Bibliographies

biblatex and Biber: Modern Bibliographies

Use biblatex and Biber for flexible citation styles, \autocite, \printbibliography, multiple bibliographies, URLs and Unicode, and learn when to choose it over BibTeX.

biblatex is a complete rewrite of the bibliography system. Instead of relying on .bst style files written in an obscure stack language, the formatting is done in LaTeX itself, so styles are easy to tweak. Its companion program Biber replaces BibTeX as the back end. Together they handle Unicode names, many entry types (@online, @software, @dataset), multiple bibliographies and sorting rules that BibTeX cannot manage.

If you are starting a new document, biblatex is usually the better choice. Use classic BibTeX when a journal template demands it.

Setup

LATEX
\documentclass{article}
\usepackage[
  backend=biber,
  style=authoryear,   % or numeric, alphabetic, apa (needs biblatex-apa)
  sorting=nyt         % name, year, title
]{biblatex}
\addbibresource{references.bib}   % note: with the extension

\begin{document}
Some claim \autocite{knuth1984}. \textcite{shannon1948} showed more.

\printbibliography
\end{document}

Differences from BibTeX that trip people up:

  • You load the package and use \addbibresource{file.bib} in the preamble, with the .bib extension.
  • You print the list with \printbibliography where you want it. There is no \bibliographystyle.
  • The build runs Biber, not bibtex: pdflatex, biber, pdflatex (twice if needed).
  • The .bib files are the same, but biblatex also understands date, url, doi, urldate, langid and the extra entry types.

Citation commands

The command you choose controls how the citation appears:

Command authoryear output numeric output
\cite{k} Knuth 1984 [1]
\parencite{k} (Knuth 1984) [1]
\textcite{k} Knuth (1984) Knuth [1]
\autocite{k} follows the style (parentheses or superscript) follows the style
\footcite{k} footnote with the full reference footnote
\citeauthor{k} Knuth Knuth
\citeyear{k} 1984 1984
\parencite[p.~12]{k} (Knuth 1984, p. 12) [1, p. 12]

\autocite is the best default: you write one command and the style decides the format. Switching your whole paper from numeric to author-year then needs only one change in the preamble.

The stand-in below shows the core idea: the same data rendered by different "styles".

JS One data set, two citation styles

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Printing and filtering the list

LATEX
\printbibliography[title={References}]

% Split into primary and secondary sources
\printbibliography[type=book,    title={Books}]
\printbibliography[nottype=book, title={Articles and other sources}]

% By keyword (add keywords = {primary} to the entry)
\printbibliography[keyword=primary, title={Primary sources}]

You can also add heading=bibintoc to include the list in the table of contents, and defernumbers=true when numbered sub-bibliographies are used. Per-chapter lists use refsection environments:

LATEX
\begin{refsection}
  Chapter text \cite{knuth1984}.
  \printbibliography[heading=subbibliography]
\end{refsection}

Customising

Because biblatex is written in LaTeX you can adjust small things without editing a style:

LATEX
\DeclareFieldFormat{url}{\url{#1}}       % print URL plainly
\renewcommand*{\finalnamedelim}{ \& }     % "A & B" instead of "A and B"
\AtEveryBibitem{\clearfield{note}}        % hide the note field
\setlength{\bibitemsep}{0.8\baselineskip} % spacing between items
\ExecuteBibliographyOptions{maxbibnames=10, minbibnames=3}

Common package options: maxcitenames=2 (use "et al." for more), giveninits=true (initials for first names), doi=false, isbn=false, url=false (hide fields you do not want), and backref=true (list the pages where each entry is cited).

biblatex versus BibTeX

Feature BibTeX + natbib biblatex + Biber
Unicode names Weak Full support
New entry types, dates No Yes
Style customisation Edit .bst LaTeX macros
Multiple bibliographies Awkward Built in
Journal template compatibility Very high Sometimes rejected
Language-specific styles Limited Rich (babel aware)

Check the instructions of your journal or university. Many accept both; some ship a .bst file and will not take biblatex.

Troubleshooting

  • Empty bibliography: you forgot to run biber, or no \cite appears in the text.
  • Please (re)run Biber: run biber main then pdflatex again. latexmk does this for you.
  • Error: "I couldn't open database file": the \addbibresource name or path is wrong.
  • Version mismatch between biblatex and Biber: update both together from your TeX distribution.
  • Entries stay unsorted: sorting=none follows citation order; nyt sorts by name.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which command do you use to load a .bib file with biblatex?

    biblatex uses \addbibresource in the preamble, with the .bib extension.
  2. 2. Which program does biblatex use by default to process the database?

    Biber is the back end designed for biblatex; plain bibtex cannot handle its features.
  3. 3. What is the advantage of \autocite over \parencite?

    \autocite maps to the citation form that suits the style, for instance parentheses or footnotes.
  4. 4. How do you print only the books in a separate section?

    \printbibliography accepts filters such as type, nottype and keyword.

Summary

  • biblatex formats in LaTeX and uses Biber as the back end, with \addbibresource and \printbibliography.
  • \autocite, \textcite and \parencite give style-aware citations.
  • Filters and refsection create several lists in one document.
  • Options such as maxcitenames, giveninits and backref tune the output without custom styles.
  • Choose BibTeX only when a publisher requires it.

Next: Table of Contents, Index and Glossaries