Blob


2 The indexing programs here are modified from the versions printed in
3 Bentley & Kernighan, EP-ODD V1 #1. The programs are also described in
4 AT&T Bell Laboratories Computing Science Technical Report No. 128,
5 ``Tools for Printing Indexes''.
7 Changes from the published version derive from further experience
8 after the paper was frozen, plus some cleanup and corrections by Joe
9 Kruskal (to whom many thanks), plus some very local features for
10 printing the AMPL book.
13 USING THE PROGRAMS
15 install
16 makes the appropriate files executable. since this file
17 is not executable, use by typing "sh <install"
18 ix.test
19 see.terms
20 these two files provide test input. make.index produces
21 standard output and files
22 foo[1-9] foo.regular foo.see foo.hier foo.all
23 from ix.test and see.terms. to make sure things
24 work when you first unbundle this file, type
25 sh <install
26 make.index ix.test >foo.ix
27 troff -ms foo.ix >foo.out
28 and then examine the troff output foo.out
29 cleanup
30 removes the garbage files left around for debugging
33 CHANGES FROM THE PAPER
35 make.index
36 handles "see" file see.terms. A line like
37 algorithms<tab>searching, sorting
38 generates in the final index
39 algorithms see searching, sorting
40 a 3rd field of %also makes it
41 algorithms see also searching, sorting
42 doclean
43 deroman
44 range.prep
45 minor change to defend against bug in some versions of "sort"
46 rotate
47 moved here (and changed as necessary) to remove subtle bug.
48 see check.data below
49 range.sort
50 -u option on sort removes duplicate entries on same page
51 range.collapse
52 reroman
53 page number concatenation removed from here ...
54 num.collapse
55 and moved to here. also commas between numbers now
56 inserted here (to make see terms easier)
57 gen.key
58 literals protected differently in gsub commands.
59 rules for non-alpha index terms slightly richer:
60 purely nonalphabetic lines first
61 lines with leading digits next
62 ordinary lines last
63 see.prep
64 changed to match changes above, and to rely on font-changing {}
65 final.sort
66 uses -d option for "telephone directory" order.
67 hierarchy
68 a rather special purpose version to replace runs of items
69 with a common one or two word prefix and replace them by
70 a head word and indented lines.
71 this also does some rearrangement to bring see terms to the top,
72 and terms with formatting info to the bottom; this is not
73 always the right thing to do.
74 format
75 letter changes (.YY) determined by first letter.
76 minor rearrangement of how output line is created.
77 commas no longer added here.
78 [Some systems have a disk-formatting program called format.]
79 check.data
80 new program that catches subtle errors in the data