In my latex document which uses the report documentclass and hyperref package, I have the following code before the end of the document:
\bibliographystyle{plain}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{refsaut}
The bibliography starts on page 91 and goes up to page 96 (say). The table of contents gives the page number for bibliography to be page 90 (which is incorrect), and clicking on the hyperlink in the ToC takes me to the chapter before the bibliography (this chapter actually starts on page 88).
If I change the order of the last two commands to the following:
\bibliographystyle{plain}
\bibliography{refsaut}
\addcontentsline{toc}{chapter}{Bibliography}
then, the page number given in the table of contents for the bibliography is page 96 (which is again incorrect). But at least now, clicking on the hyperlink in the table of contents does take me correctly to the bibliography chapter.
How do I fix this? I need to get two things: the page number in table of contents should be correct, and the hyperlink in table of contents should take me to the correct page.
\usepackage[nottoc]{tocbibind}
to the preamble, instead of trying to place\addcontentsline
at a good spot. This will also solve the problem for the lists of figures and tables.nottoc