Managing bibliographic references is essential for academic documents. LaTeX offers several solutions: classic BibTeX or modern biblatex. This guide covers both approaches.
The .bib File
References are stored in a separate .bib file. Each entry has a type and a unique key:
BibTeX
% File: references.bib
@article{einstein1905,
author = {Einstein, Albert},
title = {Zur Elektrodynamik bewegter Körper},
journal = {Annalen der Physik},
year = {1905},
volume = {322},
number = {10},
pages = {891--921}
}
@book{knuth1984,
author = {Knuth, Donald E.},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1984},
isbn = {0-201-13447-0}
}
@inproceedings{lamport1994,
author = {Lamport, Leslie},
title = {LaTeX: A Document Preparation System},
booktitle = {Proceedings of the Conference},
year = {1994},
pages = {1--10}
}
@online{wiki2024,
author = {Wikipedia},
title = {LaTeX},
url = {https://fr.wikipedia.org/wiki/LaTeX},
urldate = {2024-01-15}
}
Common Entry Types
| Type | Usage | Required Fields |
|---|---|---|
@article |
Journal article | author, title, journal, year |
@book |
Book | author, title, publisher, year |
@inproceedings |
Conference paper | author, title, booktitle, year |
@phdthesis |
PhD thesis | author, title, school, year |
@online |
Web page | author/title, url, urldate |
@misc |
Other type | None (flexible) |
Classic BibTeX Method
The traditional method uses BibTeX with the \cite and \bibliography commands:
LaTeX
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
\section{Introduction}
The theory of relativity was developed by Einstein~\cite{einstein1905}.
For more information on LaTeX, see~\cite{knuth1984, lamport1994}.
% Style and bibliography file
\bibliographystyle{plain} % Citation style
\bibliography{references} % Name of the .bib file (without extension)
\end{document}
Bibliography Styles
| Style | Citation Format | Sorting |
|---|---|---|
plain |
[1], [2], [3] | Alphabetical |
unsrt |
[1], [2], [3] | Order of appearance |
alpha |
[Ein05], [Knu84] | Alphabetical |
abbrv |
[1], [2], [3] | Alphabetical (abbreviated) |
Multiple Compilation
With BibTeX, you need to compile multiple times: LaTeX → BibTeX → LaTeX → LaTeX. On Sarmate.net, the compilation handles this automatically.
biblatex Method (Recommended)
biblatex is more modern and flexible. It uses the biber backend:
LaTeX
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
% biblatex configuration
\usepackage[
backend=biber,
style=authoryear, % Author-year style
sorting=nyt % Sorting: name, year, title
]{biblatex}
\addbibresource{references.bib} % .bib file
\begin{document}
\section{Introduction}
According to \textcite{einstein1905}, relativity...
This theory is confirmed by \parencite{knuth1984}.
For an overview, see \parencite{einstein1905, lamport1994}.
% Print the bibliography
\printbibliography
\end{document}
biblatex Citation Commands
| Command | Result (authoryear style) |
|---|---|
\cite{einstein1905} |
Einstein 1905 |
\parencite{einstein1905} |
(Einstein 1905) |
\textcite{einstein1905} |
Einstein (1905) |
\footcite{einstein1905} |
Footnote |
\citeauthor{einstein1905} |
Einstein |
\citeyear{einstein1905} |
1905 |
Popular biblatex Styles
| Style | Description |
|---|---|
numeric |
Numeric citations [1], [2] |
authoryear |
Author-year (Dupont, 2024) |
alphabetic |
Labels [Dup24] |
apa |
APA style (psychology) |
ieee |
IEEE style (engineering) |
chicago-authordate |
Chicago style |
The natbib Package
natbib is a popular alternative for author-year citations with BibTeX:
LaTeX
\usepackage{natbib}
% Dans le document
\citet{einstein1905} % Einstein (1905)
\citep{einstein1905} % (Einstein, 1905)
\citep[p.~15]{knuth1984} % (Knuth, 1984, p. 15)
\bibliographystyle{plainnat}
\bibliography{references}
Practical Tips
Citation Keys
Use memorable keys:
author+year (einstein1905) or author+keyword (einstein-relativity).
Export from Zotero/Mendeley
Reference managers can export directly to .bib format. This avoids manual entry errors.
Complete Example with biblatex
LaTeX
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[
backend=biber,
style=numeric,
sorting=none
]{biblatex}
\addbibresource{references.bib}
\title{My scientific article}
\author{John Smith}
\begin{document}
\maketitle
\section{Introduction}
Modern physics is built on the foundational work
of Einstein~\cite{einstein1905}. The typesetting of
scientific documents was revolutionized by
\LaTeX{}~\cite{knuth1984, lamport1994}.
\section{Methodology}
Our approach draws inspiration from \textcite{lamport1994}
and follows the recommendations in~\cite{knuth1984}.
\section{Conclusion}
These works demonstrate the importance of bibliographic
references in scientific research.
\printbibliography[title={References}]
\end{document}
Ready to cite your sources?
Create academic documents with automatic references
Create a free account