# [pdftex] Hyperref links to Index headings -- what am I missing?

Heiko Oberdiek oberdiek at uni-freiburg.de
Thu Sep 25 22:34:32 CEST 2003

On Thu, Sep 25, 2003 at 04:22:42PM +0300, Elisabeth Baker wrote:

> Since the index is so large, and is housed in a volume of its own (shared
> with glossaries and bibliography),
> and since these volumes are for on-line use,
> I hope to put a line across the bottom margin or along the right-hand
> margin, saying:
>
>  Symbols A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>
> such that the word "Symbols" and each letter are hyperlinked to the
> corresponding Heading in the Index chapter of the Index volume.
>
> The LaTeX I use to create this alphabet line of links (for testing)
> currently says:
>
>      \newcommand{\newindexmarginmark}[1]{%
>        \href{file:APP\#{#1}}{\textbf{#1}}%
>        }%
>
>      \newindexmarginmark{A}
>      \newindexmarginmark{B}
>      \newindexmarginmark{C}
>      ...
>
> So far, in my manualidx.ist, I have
>
>
> In a style file, I define \IndexHeading...
>
>      	\BF{\Large{#1}}%
>      %	\label{#1}%
>      }
>
> I can design the thing visually, but I can't seem to figure out how to make
> these links.  At this point, with the LaTeX written as shown above, all the

\documentclass{article}
\usepackage{makeidx}
\makeindex
\usepackage{hyperref}
\newcounter{idx}
\renewcommand*{\theidx}{#1}% counter appearance
\refstepcounter{idx}%
\label{idx:#1}%
\textbf{\Large #1}%
}

\begin{document}
\section{Hello World}
\index{Hello}
\index{World}
Index: \ref{idx:H}, \ref{idx:W}
\newpage
\printindex
\end{document}

If the index is in a separate file, the link can be done either by
the help of package xr or with the link names:
\href{index.pdf#idx.H}{\textbf{H}}

Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
--