1

I have a problem that page links are not working for my index when I include the fixme package. I can certainly come up with some sort of work around, but I'm wondering if there are any fixes for this. Here is an MWE. Links in the index are fine if the fixme package line is commented out.

\documentclass{article}
\usepackage{hyperref}
\usepackage{makeidx}
\usepackage{fixme} %<- This breaks hyperlinks for the index
\makeindex
\begin{document}
test \index{test}
\clearpage
foobar \index{foobar|textbf}
\printindex
\end{document}

1 Answer 1

1

Make sure you load the fixme package before hyperref, this is a known conflict.
So you would use the following code instead:

\documentclass{article}
\usepackage{fixme} % changed the order to set fixme before hyperref
\usepackage{hyperref}
\usepackage{makeidx}

\makeindex
\begin{document}
test \index{test}
\clearpage
foobar \index{foobar|textbf}
\printindex
\end{document}

By loading fixme before hyperref. This resolves conflicts because hyperref adjusts its hyperlinking to accommodate changes made by previously loaded packages.

As a rule of thumb, hyperref is often loaded last among packages, except for a few known exceptions (like cleveref). This is to ensure that hyperref can apply its hyperlinking functionality over the modifications made by other packages.

hyperref documentation, page 6 (under 3 Implicit behavior):

Make sure it comes last of your loaded packages, to give it a fighting chance of not being over-written, since its job is to redefine many LATEX commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .