Tools for printing indexes.
10 October 1986
This paper describes a set of programs for processing and printing the index for a book or a manual. The input is a set of lines containing index terms and page numbers. (Disclaimer: These programs do not help with the original creation of index terms!). The programs collect multiple occurrences of the same terms, compress runs of page numbers, create permutations (e.g., "index, book" from "book index"), and sort them into proper alphabetic order. The programs can cope with embedded formatting commands (size and font changes, etc.) and with roman numerals. The implementation uses an unusual software style: A long pipeline of short awk programs. This structure makes the programs easy to adapt or augment to meet the special requirements that arise in many indexes. The programs were intended to be used with troff, but can be used with TEX or monk[1] with minor changes.