(eplain.info)Exact destinations for index terms


Next: Page destinations for index terms Up: Index hyperlinks
Enter node , (file) or (file)node

5.3.8.1 Exact destinations for index terms
..........................................

In this approach, each command that marks an index term defines a unique
destination and passes its label on to the '.idx' file as part of the
'\indexentry' command. The '\indexentry' line that Eplain writes to the
'.idx' file becomes

     \indexentry{ENTRY|hlidx{LABEL}{CS}}{PAGENO}

where '\hlidx' is the command that is defined by Eplain to take three
arguments: a hyperlink label (LABEL), a name of page number encapsulator
(CS) and a page number (PAGENO). In the '.ind' file that MakeIndex will
generate, the page number will now appear as

     \hlidx{LABEL}{CS}{PAGENO}

The result of this command is '\CS{PAGENO}', wrapped up into a link
pointing to LABEL destination.

   The hyperlink labels for the index terms are generated by the
'\hlidxlabel' command, by default in the format 'IDXNUMBER', where
NUMBER is the value of the count register '\hlidxlabelnumber'. This
count register is incremented at each index term.

   The advantage of this approach, as compared to the second approach
described below, is that links in the index point to exact locations of
the indexed terms on the page. The disadvantage of this approach is that
MakeIndex will regard _all_ index entries as distinct, because each one
contains a (unique) hyperlink label. This disadvantage can be partially
overcome by the script 'idxuniq' distributed with Eplain in the 'util'
directory. This script filters out '\indexentry' lines differing only in
the hyperlink label but identical otherwise. You should process the
'.idx' with this script before passing it on to MakeIndex. For example:

     prompt$ ./idxuniq file.idx | makeindex > file.ind

Still, this solution is not ideal, as the page-range formation ability
of MakeIndex will not work, and there will be problems of apparently
identical index entries clashing (e.g., when a range-end entry appears
on the same page as another entry with the same definition; 'idxuniq'
will not filter out the second entry).


automatically generated by info2www version 1.2.2.9