# imakeidx: Hyperlink both the index title and the page number

I am creating my index using makeindex. Using hyperref, the page numbers within the index are correctly linked to the corresponding page. However, I also would like the index title (i.e. the keyword) to link to the corresponding page. I was not able to find a corresponding option in the imakeidx documentation.

Is there any way to achieve this?

Example:

\documentclass{book}

\usepackage{imakeidx}
\usepackage{hyperref}

\makeindex

\begin{document}
\section{First section}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam rutrum aliquet elit in pellentesque. Proin nulla eros, consequat nec convallis vel, vulputate vitae purus\index{purus}. Pellentesque consequat euismod sapien, ac porttitor diam laoreet id. Pellentesque habitant morbi tristique senectus\index{senectus} et netus et malesuada fames ac turpis egestas. Sed vehicula magna orci, nec congue sem congue ac. Sed fringilla aliquam interdum. Nullam quis commodo massa.

\printindex
\end{document}


This prints an index as follows:

However, I would also like to link the keywords "purus" and "senectus".

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Jan 27 '15 at 7:51
• I don't think this is a feature that hyperref supports. – egreg Jan 27 '15 at 7:55
• even if this feature can be provided, if an entry has more than one page reference, the terxt of the entry can't reliably be linked. – barbara beeton Jan 27 '15 at 14:43
• Thank you. I was not aware that a keyword can be linked to multiple pages. This, of course, makes my request kind of impossible. – Florian Jan 28 '15 at 7:03