All guides

Bibliography in LaTeX

Updated:

The simplest bibliography for a report is the thebibliography environment at the end of the document. Each entry gets a key in \bibitem, and you cite it in the text with \cite. For longer papers, BibTeX with a separate .bib file is more convenient.

List of entries

\begin{thebibliography}{9}
  \bibitem{halliday} D. Halliday, R. Resnick, J. Walker,
    \emph{Fundamentals of Physics}, Wiley, Hoboken 2014.
\end{thebibliography}

The 9 in braces is a width template: it reserves room for a one-digit number. With ten or more entries write 99, otherwise the numbers stick out past the left edge of the list.

Putting a lab report together? In CamteX you draw formulas and tables, then send the finished document to Overleaf or download it as a PDF. Try it free

Citation in the text

The value of the gravitational acceleration is given in \cite{halliday}.

\cite prints the number in square brackets, e.g. [1]. With thebibliography the numbers follow the order of the \bibitem entries, not the order in which you cite them.

Several sources and a page number

Similar results are reported in \cite{halliday,taylor}.
The formula is given in \cite[p.~112]{halliday}.

Separate the keys of several sources with commas. The optional argument in square brackets adds a page or chapter: [1, p. 112]. The tilde keeps the page number from breaking away from "p.".

An entry in a .bib file

@book{taylor,
  author    = {John R. Taylor},
  title     = {An Introduction to Error Analysis},
  publisher = {University Science Books},
  edition   = {2},
  year      = {1997}
}

With BibTeX the entries live in a separate file such as references.bib. In the text you only need the key from the first line (taylor), and the style lays out the author, title and year consistently.

Including the .bib file

\bibliographystyle{unsrt}
\bibliography{references}

The unsrt style numbers entries in citation order, plain sorts them alphabetically. Only cited entries appear; \nocite{*} adds the rest. The compile sequence is pdflatex, bibtex, then pdflatex twice, which Overleaf runs for you.

biblatex instead of BibTeX

\usepackage[backend=biber,style=numeric]{biblatex}
\addbibresource{references.bib}
% ...
\printbibliography

biblatex with biber handles accented names and Unicode correctly and switches styles with one option, for example style=authoryear for citations like (Taylor 1997). Most journals still ship BibTeX styles, so check their template first.

Common mistakes

See also

Don't want to memorize commands?

Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.

Try it free