Skip to content

Bibliography management

Prerequisite: fundamentals. Goal: maintain reusable references and understand the compilation sequence.

Separate the three responsibilities

  1. A .bib database stores citation metadata.
  2. BibLaTeX controls citation and bibliography formatting in the document.
  3. Biber processes the database and the document's citation requests.

BibLaTeX and BibTeX are not interchangeable names. This platform's examples use BibLaTeX with Biber. A journal template using BibTeX may require a different package and build sequence.

The bibliography database

Canonical shared database. These entries describe external works; their full text is not distributed here.

resources/references.bib
@book{lamport1994,
  author    = {Leslie Lamport},
  title     = {{LaTeX}: A Document Preparation System},
  edition   = {2},
  publisher = {Addison-Wesley},
  year      = {1994}
}

@online{latex-project,
  author = {{The LaTeX Project}},
  title  = {{LaTeX} Documentation},
  url    = {https://www.latex-project.org/help/documentation/}
}

@manual{pgfplots,
  author = {Christian Feuersanger},
  title  = {The {PGFPlots} Package},
  url    = {https://ctan.org/pkg/pgfplots}
}

The key lamport1994 is an identifier of our choosing. It must match the key inside \textcite{lamport1994} or \parencite{lamport1994}. Braces around {LaTeX} preserve its capitalization where a style changes titles.

Complete example

Source folder.

examples/bibliography/main.tex
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{../../resources/references.bib}
\usepackage{hyperref}

\begin{document}
\section{Citing a source}
\textcite{lamport1994} explains LaTeX's document preparation model.
The project also maintains online documentation
\parencite{latex-project}.

These are references to external works, not claims that their text
is included in this repository.
\printbibliography
\end{document}

\textcite makes the author part of the sentence; \parencite produces a parenthetical citation. The exact punctuation comes from the chosen style. \printbibliography normally lists cited entries, not every item in the database.

Compile and expected output

Run from the repository root:

cd examples/bibliography
latexmk -pdf -outdir=build main.tex

Open build/main.pdf. Expect an author-in-text citation to Lamport, a parenthetical reference to the LaTeX documentation, and two bibliography items. The uncited PGFPlots entry should not appear.

Without latexmk, the sequence in this folder is:

pdflatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex

Biber takes the job name main, not main.tex. If a citation stays unresolved, check its key, the .bib path, and the Biber log.

Practice

Cite pgfplots in a new sentence about plotting documentation. Rebuild and verify that the bibliography now includes that entry. Change the style from authoryear to numeric and inspect the difference.

Check: no citation prints its raw key or an unresolved marker, and each entry's metadata matches the actual source.

Next: research papers and theses.

Total repository views

Refresh Date: 2026-11-18