Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!diku!storm From: storm@diku.UUCP (Kim Fabricius Storm) Newsgroups: net.text Subject: Re: Indexs for nroff/troff Message-ID: <85@diku.UUCP> Date: Thu, 27-Feb-86 23:09:19 EST Article-I.D.: diku.85 Posted: Thu Feb 27 23:09:19 1986 Date-Received: Sat, 1-Mar-86 17:41:34 EST References: <108@rruxg.UUCP> Organization: DIKU, U of Copenhagen, DK Lines: 41 In article <108@rruxg.UUCP> kurt@rruxg.UUCP writes: >Nroff/troff dont seem to have this ability. It is non trivial to >write a pair of macros, lets say >.In WORD \" make index entry for word WORD using current page # > \" print word word here >The reasion that .In prints the word, is an attempt to keep the >reffrence and the word on the same page. You better print the word before you enter it into the index with the current page number; attempting to print the word may cause n/troff to print out its partially filled line, placing the word on the first line of the following page. I have experienced this myself! I have once written such a package to be used with a modified -me package. It needed a separate execution of troff to print the index (and a table of contents) because it was based on the .tm command, something like .de In \\$1 .tm .IX "\\$1" \\n% .. I then ran troff, piping the error output into another troff, formatting the index (via a special IX macro). In this way it was even possible to sort the index before it was printed. I'm sorry I can't send you the package - I don't have it at hand at present, and as I said, it must be used together with a modified -me package which I don't think I'm allowed to distribute (lots of diffs!). However, if there is enough interest in my package (it makes really nice indexes and tocs) and somebody is willing to adapt it to the standard packages, I may be persuaded to distribute what I have. But it is much more fun to make your own package, I'm sure. ------------------ Kim F. Storm, storm@diku.UUCP (seismo!diku!storm) Institute of Datalogy(=CS), U of Copenhagen, Universitetsparken 1, DK-2100 OE