# How to reference the Index?

How can I reference the index created by the package makeidx?

Minimal working example:

\documentclass{scrbook}

\usepackage{hyperref} % creates links on refs
\usepackage{makeidx}
\makeindex

\begin{document}
% add something to the index...
The foobar\index{foobar} is quite impressive!

% some reference to the index...

% print index...
\printindex
\end{document}


The obvious \label{index} does neither work before nor after \printindex.

Edit (thanks to daleif): An important fact I forgot to tell: I want the index to be linked at \ref{index}. That's why I cannot just say See index.

-
As long as it is listed in the TOC, I don't think a direct link to it is necessary. See the index ought to be reference enough. –  daleif Jun 2 '14 at 9:02
Thanks - good point! I edited my question regarding this... –  matheburg Jun 2 '14 at 9:15

There is a hook \setindexpreamble in the scr classes to add material at the beginning of the index. You can use this to set your label. Using just \ref will give a blank link, you need either a \pageref or a \nameref.

\documentclass{scrbook}

\usepackage{makeidx}
\usepackage{hyperref} % creates links on refs
\makeindex

\setindexpreamble{\label{index}}

\begin{document}
\label{start}
% add something to the index...
The foobar\index{foobar} is quite impressive!

% some reference to the index...

% print index...
\printindex
\end{document}

-

You can do it with imakeidx:

\documentclass{scrbook}

\usepackage{imakeidx}
\usepackage{hyperref} % creates links on refs

\makeindex[title={Index\label{index}}]

\begin{document}
% add something to the index...
The foobar\index{foobar} is quite impressive!

% some reference to the index...