home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / groff / bug / 281 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.2 KB  |  33 lines

  1. Newsgroups: gnu.groff.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!noao.edu!rstevens
  3. From: rstevens@noao.edu (W. Richard Stevens)
  4. Subject: Re: Annoying ?roff-ism
  5. Message-ID: <1992Dec26.202037.8253@noao.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: National Optical Astronomy Observatories, Tucson, AZ, USA
  8. References: <1992Dec23.150031.5068@spdcc.com>
  9. Distribution: gnu
  10. Date: Sat, 26 Dec 1992 20:20:37 GMT
  11. Approved: bug-groff@prep.ai.mit.edu
  12. Lines: 19
  13.  
  14. Here is the standard way that I've seen to do it.  As I recall I
  15. got this from the indexing code (mainly awk scripts) available
  16. from research.att.com (the ones described by Kernighan and Bentley
  17. quite a few years back).  Something tells me they credit this to
  18. Ravi Sethi, but I'm not certain.
  19.  
  20.   .    \" If the current diversion name is empty, print the index
  21.   .    \" entry on standard error.  Else call ourself via the
  22.   .    \" transparent mechanism so the output is generated when
  23.   .    \" the diversion (keep/save) is actually output.
  24.   .    \" Note there is a tab between the 9th arg and the page#.
  25.   .de ix
  26.   .nr PN \\n%
  27.   .ie '\\n(.z'' .tm ix: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9    \\n(PN
  28.   .el \\!.ix \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  29.   ..
  30.  
  31.     Rich Stevens  (rstevens@noao.edu)
  32.  
  33.