(eplain.info)Indexing commands


Next: Modifying index entries Up: Indexing terms
Enter node , (file) or (file)node

4.12.1.1 Indexing commands
..........................

Here are the commands.

   * '\sidx{TERM}[SUBTERM]' makes an index entry for TERM, optionally
     with subterm SUBTERM. '\idx{TERM}' also produces TERM as output.
     Example:

          \sidx{truth}[beauty of]
          The beauty of truth is \idx{death}.

     Subterms at the second and further levels can also be specified in
     SUBTERM, using the '\idxsubentryseparator' character to separate
     them. This character is by default '!'.

   * '\sidxname{FIRST M.}{VON LAST}[SUBTERM]' makes an index entry for
     'VON LAST, FIRST M.'. You can change the ', ' by redefining
     '\idxnameseparator'. '\idxname{FIRST M.}{VON LAST}' also produces
     FIRST M. VON LAST as output. (These commands are useful special
     cases of '\idx' and '\sidx'.) Example:

          \sidxname{Richard}{Stark}
          \idxname{Donald}{Westlake} has written many kinds of novels, under
          almost as many names.

   * '\sidxmarked\CS{TERM}[SUBTERM]' makes an index entry for
     'TERM[SUBTERM]', but TERM will be put in the index as '\CS{term}',
     but still sorted as just TERM. '\idxmarked\CS{TERM}' also typesets
     '\CS{term}'. This provides for the usual ways of changing the
     typesetting of index entries. Example:

          \def\article#1{``#1''}
          \sidxmarked\article{Miss Elsa and Aunt Sophie}
          Peter Drucker's \idxmarked\article{The Polanyis} is a remarkable
          essay about a remarkable family.

   * '\sidxsubmarked{TERM}\CS{subterm}' makes an index entry for TERM,
     SUBTERM as usual, but also puts SUBTERM in the index as
     '\CS{term}'. '\idxsubmarked{TERM}\CS{subterm}' also typesets 'TERM
     \CS{subterm}', in the unlikely event that your syntax is convoluted
     enough to make this useful. Example:

          \def\title#1{{\sl #1}}
          \sidxsubmarked{Anderson, Laurie}\title{Strange Angels}
          The \idxsubmarked{Anderson}\title{Carmen} is a strange twist.

   The commands above rely on MakeIndex's feature for separating sorting
of an index entry's from its typesetting. You can use this directly by
specifying an index entry as 'SORT@TYPESET'. For example:

     \sidx{Ap-weight@$A_\pi$-weight}

will sort as 'Ap-weight', but print with the proper math. The '@' here
is MakeIndex's default character for this purpose. See
<http://www.ctan.org/tex-archive/indexing/makeindex>. To make an index
entry with an '@' in it, you have to escape it with a backslash; Eplain
provides no macros for doing this.

   After any index command, Eplain runs '\hookaction{afterindexterm}'.
Because the index commands always add a whatsit item to the current
list, you may wish to preserve a penalty or space past the new item. For
example, given a conditional '\if@aftersctnhead' set true when you're at
a section heading, you could do:

     \hookaction{afterindexterm}{\if@aftersctnhead \nobreak \fi}


automatically generated by info2www version 1.2.2.9