4. Bibliographies #
A citation points to a source; the bibliography describes that source. LaTeX can connect them automatically. This chapter covers two approaches: a small manually formatted list and a structured database processed with biblatex and Biber.
4.1 The thebibliography Environment #
For a short self-contained document, no extra package is necessary:
\documentclass{article}
\begin{document}
Knuth describes the underlying typesetting system in
The TeXbook~\cite{knuth1984}.
\begin{thebibliography}{9}
\bibitem{knuth1984}
Donald E. Knuth.
\emph{The TeXbook}.
Addison-Wesley, 1984.
\end{thebibliography}
\end{document}
Compile twice. \bibitem{knuth1984} defines the citation key and \cite{knuth1984} inserts its label.
The argument {9} describes the width needed for a label, not the number of entries. Use {99} when two-digit labels may occur. \bibitem[Knuth84]{knuth1984} supplies a custom label.
With this approach, you format, order, and maintain every entry yourself. A change in bibliography style may require editing all of them. For a growing document, use a database instead.
4.2 biblatex with Biber #
biblatex controls citation and bibliography formatting inside LaTeX. Biber is the separate program that processes the database, sorts entries, and prepares the data that LaTeX reads.
A .bib file is often called a “BibTeX file” even when Biber processes it. The database format and the processing program are different things.
4.2.1 Database files #
Create references.bib in the same project as main.tex:
@book{knuth1984,
author = {Knuth, Donald E.},
title = {The {TeX}book},
date = {1984},
publisher = {Addison-Wesley}
}
@manual{lshort,
author = {Tobias Oetiker and Marcin Serwin and Hubert Partl
and Irene Hyna and Elisabeth Schlegl},
title = {The Not So Short Introduction to {LaTeX}},
date = {2025-05-12},
version = {7.0 nightly},
url = {https://tobi.oetiker.ch/lshort/lshort-a5.pdf}
}
Each entry has a type, a unique key, and named fields. Common types include:
| Type | Typical fields |
|---|---|
@article |
author, title, journaltitle, date, volume, number, pages, doi. |
@book |
author or editor, title, date, publisher. |
@online |
author, title, url, date, urldate. |
@manual |
author or organization, title, version, date, url. |
@misc |
A source that does not fit a more specific type. |
Fields required for a good citation depend on the source and style. Keep the metadata accurate; a style cannot repair an incorrect author name or invented publication date.
4.2.2 Using biblatex #
Put this complete document in main.tex, alongside references.bib:
\documentclass{article}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
\begin{document}
\textcite{knuth1984} explains TeX.
An introduction to LaTeX is available separately
\parencite{lshort}.
\printbibliography
\end{document}
The filename in \addbibresource includes the .bib extension. It goes in the preamble; \printbibliography goes where the bibliography should appear.
For a local build, run:
xelatex main.tex
biber main
xelatex main.tex
xelatex main.tex
Use the base filename with Biber, not main.tex. The first pass writes citation requests, Biber resolves the database, and subsequent LaTeX passes lay out the bibliography and finish references.
In an online project, use its bibliography build support. If citations remain unresolved, inspect the log for a Biber request and verify the database filename and keys. Do not replace Biber with BibTeX while keeping backend=biber.
4.2.3 Controlling the bibliography #
Set options on the existing biblatex loading line:
\usepackage[
backend=biber,
style=numeric,
sorting=none,
maxnames=3,
minnames=1
]{biblatex}
| Option | Meaning |
|---|---|
style=numeric |
Numbered citations. |
style=authoryear |
Author-and-year citations. |
style=alphabetic |
Abbreviated alphabetic labels. |
style=verbose |
Fuller citations, commonly used with notes. |
sorting=nty |
Sort by name, title, year. |
sorting=ynt |
Sort by year, name, title. |
sorting=none |
Keep citation order. |
maxnames and minnames control shortened name lists. If the list exceeds the maximum, the style can show the minimum number followed by “et al.” A publisher’s bibliography style may impose its own settings.
Only cited entries are normally printed. Use \nocite{knuth1984} to include an uncited entry or \nocite{*} to include the whole database.
For a custom title and an entry in the contents:
\printbibliography[
title={References},
heading=bibintoc
]
Filter a large bibliography by entry type or keyword:
\printbibliography[type=book,title={Books}]
\printbibliography[type=manual,title={Manuals}]
A keyword filter uses keyword=primary after assigning keywords={primary} to entries in the database. Avoid overlapping filters unless repeated entries are intentional.
4.2.4 Citing commands #
| Command | Use |
|---|---|
\cite{key} |
A basic citation in the selected style. |
\parencite{key} |
A parenthetical citation. |
\textcite{key} |
A citation that forms part of the sentence. |
\footcite{key} |
A citation in a footnote. |
\autocite{key} |
Citation placement controlled by the style and options. |
\citeauthor{key} |
The author names only. |
\citetitle{key}, \citeyear{key} |
The title or year only. |
Most citation commands accept a prenote and a postnote:
See \parencite[23]{knuth1984}.
Compare \parencite[see][23--25]{knuth1984}.
Both sources discuss typesetting \parencite{knuth1984,lshort}.
With one optional argument, it is a postnote, often a page number. With two, the first is a prenote. Let the style supply punctuation and labels such as “p.” where appropriate.
4.2.5 More about entries #
Separate authors with the word and, not commas alone:
author = {Family, Given and Otherfamily, Othergiven}
Preserve an organisation’s name as one author with an extra pair of braces:
author = {{Example Research Group}}
Protect significant capitalisation within a title:
title = {An Introduction to {LaTeX} and {UTF-8}}
Use protection only for the parts that require it so the chosen style can still apply its normal title casing.
Shared metadata can be placed in an @xdata entry. This illustrative database describes fictional books:
@xdata{series-info,
publisher = {Example Press},
location = {London}
}
@book{example-first,
author = {Alex Writer},
title = {First Experiments},
date = {2024},
xdata = {series-info}
}
@book{example-second,
author = {Alex Writer},
title = {Further Experiments},
date = {2025},
xdata = {series-info}
}
Exported references still need review: check entry types, author splitting, titles, DOI fields, dates, and duplicate keys. TeXPage’s Zotero integration can help maintain a database, while the LaTeX citation commands remain the same.