# Hyperref and imakeidx do not work together

I use imakeidx package to generate index in my document. I'd like to add hyperlinks into my Index, but it seems to me that hyperref and imakeidx do not work together. For example, this code doesn't create linkable index:


\documentclass[11pt]{book}
\usepackage[pdftex]{color}

\usepackage{hyperref}
\hypersetup{
citecolor=green,
filecolor=green,
urlcolor=green
}
\usepackage[makeindex]{imakeidx}
\makeindex
\begin{document}
Text\index{text}
\printindex
\end{document}


How to fix this problem? Thanks.

-
Welcome to TeX.sx! –  Martin Scharrer Jun 30 '11 at 21:14
Load imakeidx before hyperref. Generally, hyperref should be loaded last, though there are some exceptions (see Which packages should be loaded after hyperref instead of before? ).