I want to make the indexed words into hyperlinks to the entries in the "Index" (something similar to the glossaries
package).
I'm using xindy
on TL2012
and here is my code:
\documentclass{article}
\usepackage{makeidx}
\makeindex
\usepackage{hyperref}
\begin{document}
Lorem\index{Alpha} ipsum dolor sit amet, consectetur\index{alpha}
adipiscing elit. Proin ullamcorper\index{gnat} quam magna, quis
convallis\index{gnus!good} sapien. Donecat ligula vel dolor
varius\index{bites!vegetable} lobortis id ut orci\index{gnat!size
of}. Maecenas commodo fringilla elit\index{Alphabet}, et pellentesque
purus ornare vitae. Aenean non metus ipsum. Lorem\index{gnat!anatomy}
ipsum dolor sit amet, consectetur adipiscing\index{alphas} elit. Ut
mauris lorem, accumsan a sagittis ut, rutrum fringilla arcu. Cras
ullamcorper faucibus\index{alpha bet} quam id molestie.
\printindex
\end{document}
How can I do that?
Best Answer
Generally the indexed words do not necessarily appear in the text at all (for example there can be a
fox
in the text and an\index{animals}
next to it). Therefore I'm not sure whether I understand your question right.Does this accomplish what you intended? (This works without
xindy
, but with it there can be problems.)