Add the bibliography to the table of contents in LaTeX

The standard classes leave the bibliography out of the table of contents. With biblatex, write \printbibliography[heading=bibintoc]. With BibTeX, load the tocbibind package.

With biblatex

heading=bibintoc keeps the heading unnumbered and adds it to the table of contents. heading=bibnumbered turns it into a numbered section, or a numbered chapter in report and book.

Complete document:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{references.bib}
\begin{document}
\tableofcontents
\section{Introduction}
The sensors have no moving parts \cite{weber2019}.

\printbibliography[heading=bibintoc]
\end{document}
Result
The compiled example

Open in the editor

With BibTeX or thebibliography

tocbibind adds the bibliography, the index and the lists of figures and tables to the table of contents. Its option nottoc keeps the table of contents from listing itself, and numbib gives the bibliography a section number.

Complete document:

\documentclass{article}
\usepackage[nottoc]{tocbibind}
\begin{document}
\tableofcontents
\section{Introduction}
The sensors have no moving parts \cite{weber2019}.

\bibliographystyle{plain}
\bibliography{references}
\end{document}
Result
The compiled example

By hand, without a package

\addcontentsline before the bibliography writes the entry. \refname holds the heading in article; in report and book the heading is a chapter, so use {chapter}{\bibname} and a \clearpage before the line, otherwise the entry gets the number of the page before.

Complete document:

\documentclass{article}
\begin{document}
\tableofcontents
\section{Introduction}
The sensors have no moving parts \cite{weber2019}.

\addcontentsline{toc}{section}{\refname}
\bibliographystyle{plain}
\bibliography{references}
\end{document}
Result
The compiled example

KOMA-Script classes

The class option bibliography=totoc adds the bibliography to the table of contents, and bibliography=numbered also numbers it. biblatex follows this option, so plain \printbibliography is enough.

Complete document:

\documentclass[bibliography=totoc]{scrartcl}
\usepackage{biblatex}
\addbibresource{references.bib}
\begin{document}
\tableofcontents
\section{Introduction}
The sensors have no moving parts \cite{weber2019}.

\printbibliography
\end{document}
Result
The compiled example

Open in the editor

File references.bib:

@book{schmidt2021,
  author    = {Schmidt, Anna},
  title     = {Wind Measurement in Practice},
  edition   = {2},
  publisher = {Example Press},
  address   = {Berlin},
  year      = {2021}
}

@article{weber2019,
  author  = {Weber, Ben and Schmidt, Anna},
  title   = {Ultrasonic Sensors in Wind Tunnels},
  journal = {Journal of Example Studies},
  volume  = {12},
  number  = {3},
  pages   = {45--67},
  year    = {2019}
}

@online{keller2023,
  author  = {Keller, Mia},
  title   = {Calibrating a Wind Sensor},
  year    = {2023},
  url     = {https://www.example.org/calibration},
  urldate = {2025-03-01}
}

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages