[texhax] Link to index in TOC points to first index entry

Thomas Heinz thomasheinz at gmx.net
Thu Apr 30 14:53:43 CEST 2009


Hi,

Given the following example:

\documentclass{report}
\usepackage{makeidx}
\usepackage[pdftex]{hyperref}
\makeindex
\begin{document}
\tableofcontents
\cleardoublepage
\index{Test} 1,2,3
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\indexname}
\printindex
\end{document}

I get a pdf document where the link to the index in the table of contents 
points to the correct page but instead of pointing to the top of the page, 
the link points to the first entry in the index. For the bibliography, 
this works correctly.

If I use tocbibind as in the following example, I get the same result.

\documentclass{report}
\usepackage{makeidx}
\usepackage[nottoc]{tocbibind}
\usepackage[pdftex,pdfpagelabels]{hyperref}
\makeindex
\begin{document}
\tableofcontents
\cleardoublepage
\index{Test} 1,2,3
\cleardoublepage
\phantomsection
\printindex
\end{document}

Is this really expected behaviour?
How can I get a link to the top of the index page?

Thanks for your help.


Best regards,

Thomas


More information about the texhax mailing list