(eplain.info)Typesetting an index


Next: Customizing indexing Prev: Indexing terms Up: Indexing
Enter node , (file) or (file)node

4.12.2 Typesetting an index
---------------------------

The command '\readindexfile{i}' reads and typesets the '.ind' file that
MakeIndex outputs (from the '.idx' file which the indexing commands in
the previous sections write). Eplain defines a number of commands that
support the default MakeIndex output.

   More precisely, '\readindexfile' reads
'\indexfilebasename.INDEX-LETTERnd', where the INDEX-LETTER is the
argument. '\indexfilebasename' is '\jobname' by default, but if you have
different indexes in different parts of a book, you may wish to change
it, just as with bibliographies (Note: Citations).

   MakeIndex was designed to work with LaTeX; therefore, by default the
'.ind' file starts with '\begin{theindex}' and ends with
'\end{theindex}'. If no '\begin' has been defined, Eplain defines one to
ignore its argument and set up for typesetting the index (see below),
and also defines a '\end' to ignore its argument. (In a group,
naturally, since there is a primitive '\end').

   Eplain calls '\indexfonts', sets '\parindent = 0pt', and does
'\doublecolumns' (Note: Multiple columns) at the '\begin{theindex}'.
'\indexfonts' does nothing by default; it's just there for you to
override. (Indexes are usually typeset in smaller type than the main
text.)

   It ends the setup with '\hookrun{beginindex}', so you can override
anything you like in that hook (Note: Hooks). For example:

     \hookaction{beginindex}{\triplecolumns}

   MakeIndex turns each main index entry into an '\item', subentries
into '\subitem', and subsubentries into '\subsubitem'. By default, the
first line of main entries are not indented, and subentries are indented
1em per level. Main entries are preceded by a '\vskip' of
'\aboveitemskipamount', '0pt plus2pt' by default. Page breaks are
encouraged before main entries ('\penalty -100'), but prohibited
afterwards--Eplain has no provision for "continued" index entries.

   All levels do the following:

     \hangindent = 1em
     \raggedright
     \hyphenpenalty = 10000

   Each entry ends with '\hookrun{indexitem}', so you can change any of
this. For example, to increase the allowable rag:

     \hookaction{indexitem}{\advance\rightskip by 2em}

   Finally, MakeIndex outputs '\indexspace' between each group of
entries in the '.ind' file. Eplain makes this equivalent to '\bigbreak'.


automatically generated by info2www version 1.2.2.9