Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!adelie!ora!tim From: tim@ora.UUCP (Tim O'Reilly) Newsgroups: comp.text Subject: Re: troff indexes Message-ID: <649@ora.UUCP> Date: Mon, 10-Aug-87 10:48:13 EDT Article-I.D.: ora.649 Posted: Mon Aug 10 10:48:13 1987 Date-Received: Wed, 12-Aug-87 01:36:55 EDT References: Organization: O'Reilly & Associates, Inc., Newton, MA Lines: 30 In article , ao06+@andrew.cmu.edu (Ayami Ogura) writes: > > Has anybody out there ever created an index with troff? Or had success using > the ptx program? In our book, UNIX Text Processing, (Hayden Books/Howard Sams, April 1987), Dale Dougherty and I discuss this topic in detail. You can write a macro that prints out an index entry plus a page number; this data can either be collected into a diversion, or preferably written to stderr with the .tm request (in otroff or ditroff) or directly into a file with .sy echo (ditroff only). This file can be postprocessed with sort, awk and sed to combine multiple entries, and to format the index properly. Ptx is not all that useful, but if you need to make one, you need it. The process is too long to go into here (since I'm reading news early one morning over a long-distance phone link while ostensibly on vacation), but if you send me mail, I'll send you out details when I get back to the office in a couple of weeks. If there is sufficient interest, I'll post the discussion to the net. (Note: ptx is not covered in our book. Sorry.) -- Tim O'Reilly (617) 527-4210 O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks 981 Chestnut Street, Newton, MA 02164 UUCP: seismo!uunet!ora!tim ARPA: tim@ora.uu.net