SUMMARY This paper describes a set of programs for processing and printing the index for a book or a manual. The input consists of lines containing index terms and page numbers. 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.), with roman numeral page numbers, and with see terms. The programs do not help with the original creation of index terms. The implementation runs on the UNIX ® operating system. It uses a long pipeline of short awk programs rather than a single program in a conventional language. This structure makes the programs easy to adapt or augment to meet special requirements that arise in different indexing styles. The programs were intended to be used with troff , but can be used with a formatter like TEX with minor changes. An appendix contains a complete listing of the programs, which total about 200 lines.
['Jon Louis Bentley', 'Brian W. Kernighan']
Tools for printing indexes