(eplain.info)Page destinations for index terms


Next: Choosing destination placement Prev: Exact destinations for index terms Up: Index hyperlinks
Enter node , (file) or (file)node

5.3.8.2 Page destinations for index terms
.........................................

In the second approach, Eplain does not write out any destination labels
for the index terms. Instead, Eplain writes out a wrapper for page
number encapsulator which can parse the page number and generate a link
pointing to the _page_ on which the term appeared. On top of each page
containing an index term, Eplain defines a destination with label
produced by '\hlidxpagelabel'. The '\hlidxpagelabel' command takes a
single argument (page number NUMBER) and by default produces the label
in the format 'IDXPGNUMBER'.

   With this approach, the '\indexentry' line which Eplain writes to the
'.idx' file looks like this:

     \indexentry{ENTRY|hlidxpage{CS}}{PAGENO}

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

     \hlidxpage{CS}{PAGENO}

   The advantage of this approach is that all features of MakeIndex are
intact. The drawback is that links in the index do not point to exact
locations of indexed terms on a page, but to the top of a page on which
the term appears.

   Another disadvantage is that this approach depends on the page range
and page list separators which MakeIndex was configured to output.
'\hlidxpage' must be able to parse the first page number in a page range
like '1--4'. In addition, page list parsing is needed because MakeIndex
combines two consecutive page numbers in one call to the page number
encapsulator, so '\hlidxpage' can be passed, e.g., '1, 2' for the
PAGENO. In this last case, '\hlidxpage' splits the two page numbers,
applies '\CS' to each of them, and makes each of the page numbers a link
to the appropriate page. Note that this will alter typesetting slightly,
because now the page list separator (a comma followed by a space, by
default) is not typeset using the page number encapsulator ('\CS').

   Eplain's defaults for the page list and page number delimiters are
the same as those in MakeIndex, a comma followed by a space (', ') and
two dashes ('--'), respectively. If you customize MakeIndex to use
different delimiters, you must not forget to let Eplain know about them
with the commands

     \setidxpagelistdelimiter{LIST-DELIM}
     \setidxpagerangedelimiter{PAGE-DELIM}

(Note: Page list and page range parsers).


automatically generated by info2www version 1.2.2.9