2

A document I'm writing needs an index. This is fine... except that the 'front matter' has roman page numbers, which appears to be messing things up.

On compilation, I get the warning 'pdfTeX warning (dest): name{page.i} has been referenced but does not exist, replaced by a fixed one'.

The entries in the index are fine - but the links don't go to the correct pages.

As far as I can tell, none of the answers on here quite correspond to my problem. I'm even more mystified, given that the makeindex documentation states "MakeIndex assumes that all page numbers are either arabic or lowercase roman numerals; it assumes that pages numbered with roman numerals precede those numbered with arabic numerals."

Can anyone shed any light on what I'm doing wrong? Or will makeindex/hyperref simply not do what I'm asking (and expecting) of it? If so, is there another way to achieve what I'm trying to do?

[I should add, I've looked at trying texindy, and really can't understand what's going on!]

MWE

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[hypertexnames=false]{hyperref}
\usepackage{makeidx} % For creating indexes

\makeindex

\begin{document}

\pagenumbering{roman}
\chapter{Further Reading}
    \label{chap:furtherreading}
    Further reading goes here \index{Reading}

\clearpage

\chapter{Logging In}
\pagenumbering{arabic}
    \label{chap:loggingin}
    Some text for the first main page. \index{Main}

\clearpage

\printindex

\end{document}
1

hypertexnames=false destroys the index feature here, because it removes the formatting of the page counter in the page anchor names.

  • 1
    Gosh, that was simple! I wonder why I had set that :-/ – JustinT Apr 5 '16 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.