Using bibtex, I can't get the right numberpage of the bibliography in the table of contents. The toc shows the last number page of the bibliography, so that in my case, at the bottom of the table of contents I've got "9 Bibliography 75" but it should be "71". I can't fix it.
\documentclass[a4paper,11pt]{book}
\pdfpagewidth
\paperwidth
\pdfpageheight
\paperheight
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\makeindex
\usepackage{url}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{rotating}
\usepackage{caption}
\geometry{a4paper,tmargin=3cm,bmargin=4cm, lmargin=3.7cm,rmargin=3.7cm}
\usepackage{multirow}
\usepackage{splitbib}
\begin{document}
\cite{example}
\begingroup
\pagestyle{plain}
\sloppy
\begin{category}[]{name}
\SBentries{example}
\end{category}
\bibliographystyle{plain}
\bibliography{name of the bib file}
\addtocounter{chapter}{1}
\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}\bibname}
\endgroup
\end{document}
\addcontentsline
command is after the bibliography so naturally it stores the page number from the end of the bibliography.\addcontentsline
than\bibliography
.