Article View: comp.text
Article #755marginal hacks with ditroff
From: Richard Stevens
Date: Fri, 08 Sep 1989 13:27
Date: Fri, 08 Sep 1989 13:27
24 lines
1567 bytes
1567 bytes
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
Technical Details
Message-ID:
<578@hsi86.hsi.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!hsi!stevensShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!hsi!stevens From: stevens@hsi.UUCP (Richard Stevens) Newsgroups: comp.text Subject: marginal hacks with ditroff Keywords: index, ditroff Message-ID: <578@hsi86.hsi.UUCP> Date: 8 Sep 89 13:27:53 GMT Organization: Health Systems Intl., New Haven, CT Lines: 24