[Tex/LaTex] Making the bibliography appear in the table of contents

bibliographiessectioningtable of contents

I need to make my (BibTeX) references section appear in the table of contents of my LaTeX document (documentclass: article), with section numbering too.

My approach until now has been making a new section and including the bibliography (references.bib) at that point:

\section{References}
\bibliography{references}

However, the final document shows both the section title that I have written and the section title that BibTeX writes, which is quite redundant and I definitely dislike.

How can I either remove BibTeX's section title, or make the BibTeX bibliography appear in the table of contents without making a new section?

If I were to make the BibTeX bibliography appear in the table of contents without making a new section, how could I assure that the section title that BibTeX writes looks exactly like sections typeset with \section?

Best Answer

As Herbert has hinted, your document class may include options to control the inclusion of the bibliography in the table of contents. For standard classes (article, book, report), adding \usepackage[nottoc,numbib]{tocbibind} to your document preamble should work. See the tocbibind documentation for more details.

EDIT: Herbert's suggestion (adding \addcontentsline{toc}{section}{References}) may result in an incorrect ToC entry unless the Reference section is forced on a separate page with \clearpage:

\documentclass[11pt]{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\usepackage{blindtext}

\begin{document}

\nocite{*}

\tableofcontents

\section{foo}

\blindtext[3]

% \clearpage

\addcontentsline{toc}{section}{References}
\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}