[Tex/LaTex] Incorrect bookmarks and page number in table of contents

bibliographiesbookmarkspage-breakingtable of contents

I have problem with table of contents and with bookmarks. In pdf file

  • table of contents shows wrong page number of Introduction and Bibliography,

  • Bookmarks: introduction and bibliography don't bring me to the correct page.

Part of my code

\documentclass[12pt,a4paper]{book}

\usepackage[polish]{babel}
\usepackage{polski}
\usepackage[cp1250]{inputenc}
\usepackage[pdftex,pagebackref=false,draft=false,pdfpagelabels=false,pdfstartview=FitH,pdfstartpage=1,bookmarks=true,pdfauthor={LiN},pdftitle={PD},pdfsubject={Titlei},pdfkeywords={words},unicode=true]{hyperref} 
\usepackage{tocloft}

\begin{document}
\tableofcontents
\addcontentsline{toc}{chapter}{Introduction}
\chapter*{Introduction}
\chapter{Chapter1}
\section{Section}
\addcontentsline{toc}{chapter}{Bibliography}
\begin{thebibliography}{9999999}%
\bibitem{1}Author, \emph{Title of book}, Publisher.
\end{thebibliography}
\end{document}

How can I change that?

Best Answer

Put a \cleardoublepage before \addcontentsline. Also a \phantomsection is needed, since you are using hyperref:

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Introduction}
\chapter*{Introduction}

\clearpage gives a wrong result if the Table of Contents has an odd number of pages; \cleardoublepage avoids the problem altogether.

Another way is to put \addcontentsline after \chapter*{Introduction}; the same for the bibliography:

\begin{thebibliography}{9999999}
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibitem{1}Author, \emph{Title of book}, Publisher.
\end{thebibliography}

The method \cleardoublepage\phantomsection\addcontentsline must be used for the lists of figures and tables and for the bibliography if it's done with BibTeX.