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{
colorlinks,
citecolor=green,
filecolor=green,
linkcolor=blue,
urlcolor=green
}
\usepackage[makeindex]{imakeidx}
\makeindex
\begin{document}
Text\index{text}
\printindex
\end{document}
How to fix this problem? Thanks.