Next: better-Haskell-indexing
Prev: delatexify-commands
Up: april91-new-ideas
Top: Top
0.9.1.2. Multiple indexes
Having one index for a pretty-big program is a dubious proposition;
you get a huge index. I think you need multiple indexes -- in
the case of a compiler, you might then have a separate index for:
parser, typechecker, syntactic desugarer, optimiser, etc.
Let's assume you index all the pieces of a compiler (as above) as
self-contained units. PROBLEM: it is the uses of functions, etc.,
that cross such boundaries that you would MOST like to have your
attention drawn to.
That problem aside, I think this is the basic solution:
- \defineindex{<index-tag-string>}:
- Says that <index-tag-string> is "legal" hereafter.
Requiring/encouraging these `\defineindex' will help to catch typos.
- \index[<index-tag-string>]{<entry>}:
- The `\index' command has an optional <index-tag-string> with
which this <entry> should be tagged. The default tag
string is `main' (unless reset with `\setindex...'; below).
- \printindex[<index-tag-strings>]:
- Print an index here, made up from all the entries that have one of the
<index-tag-strings>. The default tag string is (same
caveats...) `main'.
- \setcurrentindex{<index-tag-string>}:
- Set the default tag string for `\index' commands in text.
I think you could use the mechanism above to come close to Texinfo's
idea about multiple indexes.