[Tex/LaTex] Anchor index for clickable index words

hyperrefindexing

makeidx package will list the words and references to the pages they appeared. Is it possible to mix the page numbers with \hyperref package to make the page numbers clickable with \hyperlink{page.x}{indexed term}? Going to the page provided in the index upon clicking on page number.

Best Answer

That is the default behavior as long as you load the hyperref package last:

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage{imakeidx}% For index generation
\usepackage{hyperref}% Load last (AFTER imakeidx)

\makeindex

\begin{document}
  \lipsum[1]
  \index{foo}
  \lipsum[2]
  \printindex
\end{document}
Related Question