stevens@hsi.UUCP (Richard Stevens) (09/08/89)
I'm doing an index for a book using ditroff and the standard type of index macro in the document (uses the .tm command to write the arguments and page number to stderr, handling the case of being in a diversion which Jaap posted a week or so ago). But, I'd like to redefine the .ix macro for some runs so that it prints the index terms in the right margin so that I can go through the printed manuscript and see what terms are being indexed, and where. Knuth shows an example of this in the TeX book, p. 415 (marginal hacks). I can't, however, figure out an easy and good way to have ditroff do this. One solution that kind of works is to print the index term using the 3-part title command (.tl). In case there are multiple terms on an output line, I horizontally space within the .tl string using the .k register. A problem with this, however, is that the .tl command can trigger a bottom-of-the-page trap before the text line is output, so the resulting document isn't exactly like it should be. Does anyone have a better solution to this ? Richard Stevens Health Systems International, New Haven, CT stevens@hsi.com ... { uunet | yale } ! hsi ! stevens