Problem Statement
I use BibTeX for the Bibliography, makeindex for the Index and hyperref to create the hyperlinks.
In the .pdf file that I get after compiling, all hyperlinks (e.g., ToC entries, page references in the Index, citations of Bibliography entries,...) work, except for the Index entry in the ToC, which instead points to the Bibliography (the Bibliography ToC entry also links to the Bibliography).
How to reproduce the problem
Here is my example.tex file, reduced to a MWE:
\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{lipsum}
\usepackage{makeidx}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{hyperref}
\makeindex
\begin{document}
\bibliographystyle{unsrt}
%\nocite{*}
\frontmatter
\title{Title}
\author{Author}
\date{}
\maketitle
\tableofcontents
\mainmatter
\chapter{First chapter}
\section{First section\index{section}}
\lipsum[1-2]
\section{Second section}
\lipsum[1-2]
Cite-example\cite{ref1}
\backmatter
\bibliography{biblio.bib}
\printindex
\end{document}
and my biblio.bib file:
@book{ref1,
author = "Author",
title = "Title",
year = 1490
}
Finally, here is the routine I use in compiling (I am running TeXLive in GNU/Linux Fedora20):
pdflatex example.tex
makeindex example.idx
bibtex example.aux
pdflatex example.tex
pdflatex example.tex
What am I doing wrong?
tocbibind; see wrong hyperref for Index in tableofcontents since TeXlive 2010 – barbara beeton Jul 18 '14 at 20:36\clearpage \phantomsection \printindex \addcontentsline{toc}{chapter}{\indexname}. Now the problem is that the Index ToC entry points to the start of the Index instead of displaying the Index title. – Pier Paolo Jul 18 '14 at 21:11Indicein Italian? – Jul 18 '14 at 21:20Indice analitico? – Jul 18 '14 at 21:28Indice analiticoinstead of linking to the title? In your MWE there is just one index entry,section– Jul 18 '14 at 21:31\indexname). It's not really a problem, though. – Pier Paolo Feb 18 '15 at 23:14scrbook(which I actually use now instead of the standard classes). However, it generates a spurious blank page after the index itself and moreover it affects the page style: the first page of the index has a different style than the one I defined with\renewcommand*{\chapterpagestyle}{...}and the following page as the header, even though I loaded the packageemptypageto explicitly suppress it. – Pier Paolo Feb 19 '15 at 17:23\renewcommand*{\indexpagestyle}{...}but the spurious blank (not really, it still has the header) page is still there. – Pier Paolo Feb 19 '15 at 17:57indexpagestyleis the right keyword. the default with KOMA-classes is, i think,cleardoublepage=empty, so i guess for this part, a new question is in order. But back to the topic at hand, what to do with this question? To be honest, i haven't even tested your MWE. Shall i look into the matter, or dupe it as one of the above linked Qs? – Johannes_B Feb 19 '15 at 20:36scrbookand I plan to investigate it before posting another question. Thank you for your time.:)– Pier Paolo Feb 19 '15 at 21:00