Go to the first, previous, next, last section, table of contents.

Indexing

Eplain provides support for generating raw material for an index, and for typesetting a sorted index. A separate program must do the actual collection and sorting of terms, because TeX itself has no support for sorting.

Eplain's indexing commands were designed to work with the program MakeIndex, available from `ftp.math.utah.edu' in the directory `pub/tex/makeindex', and from CTAN hosts in `tex-archive/indexing/makeindex'; MakeIndex is also commonly included in prepackaged TeX distributions. It is beyond the scope of this manual to explain how to run MakeIndex, and all of its many options. See section `MAKEINDEX' in MakeIndex.

The basic strategy for indexing works like this:

  1. For a document `foo.tex', Eplain's indexing commands (e.g., \idx; see the section `Indexing terms' below) write the raw index material to `foo.idx'.
  2. MakeIndex reads `foo.idx', collects and sorts the index, and writes the result to `foo.ind'.
  3. Eplain reads and typesets `foo.ind' on a subsequent run of TeX. See the section `Typesetting an index' below.

If your document needs more than one index, each must have its own file. Therefore, Eplain provides the command \defineindex, which takes an argument that is a single letter, which replaces `i' in the filenames and in the indexing command names described below. For example,

\defineindex{m}

defines the command \mdx to write to the file `foo.mdx'. Eplain simply does \defineindex{i} to define the default commands.


Go to the first, previous, next, last section, table of contents.