How to include Bibliography in TOC?

I have problem with adding the {Bibliography} to the table of content. I have tried \addcontentsline{toc}{chapter}{Bibliography} but it appears at the top of TOC not at the bottom.

• Where did you write in the code? Jul 8, 2018 at 18:56
• just after the command \tabelofcontent Jul 8, 2018 at 18:59
• Try writing it just after the code for the bibliography. Jul 8, 2018 at 19:00
• Depending on your setup, you might be interested in the tocbind package which handles exactly this. Note that adding \addcontentsline just after he bibliography code only gives you the correct page number if the bibliography fits on a single page, otherwise it will point at the last page. The mentioned package hooks into the bibliography it self and adds it at the start. Jul 8, 2018 at 19:30
• @Skillmon why? See esdds answer Jul 9, 2018 at 0:03

There is the biblatex tag in the question. So maybe you can use

\printbibliography[heading=bibintoc]


Example:

\documentclass{article}
\usepackage{lipsum}% only for dummy text
\usepackage[style=authoryear,backend=biber]{biblatex}
\begin{document}
\tableofcontents
\section{Example}
\lipsum
\nocite{*}

• @skan Use heading=bibnumbered, see the documentation of package biblatex.