To Index

 Documented in Volume 1 of the UNIX Programmers Manual.


 % vtroff -man /usr/man/man1/rn.1
  will run vtroff, using the man macros (-man), using as input the file
  named /usr/man/man1/rn.1 and queuing the output to the Versatec printer.
  This shows how to print a man page on the Versatec
  for the program named rn.

  NOTE: From Ron Natalie  
  Subject: vtroff font change
    The legal fonts in standard troff are R, I, B, S (Roman, Italic, Bold,
  and special).  Any others have to be hacked in.  The way vtroff does this
  is by having a file called .railmag which maps the vfont names onto a cat
  position number. Once you do this, you may then use .fp. The program looks
  first in the current directory for the railmag file.
    As for point size changes you can either use the .ps directive or the \s
  inline characters. See the TROFF manual. Don't forget that if you change the
  pointsize, you probably also want to change the vertical spacing amount.
  You must do a point size change that corresponds to the font. Not all fonts
  exist in all point sizes.


 #! /bin/csh	# A technique for getting a brute-force index from troff:
 # from: lee@rochester.arpa (TCP/IP) (Lee Moore)
 #                   Organization: U. of Rochester, CS Dept.
 # 	This script provides an index capability for n/troff and it
 # interacts with the following nroff macro definition for page/index
 # entries:
 #	.de IN		\" send an index entry to the stderr
 #	.tm \\n%\t\\$1\t\\$2
 #	..
 # Sample index entries in the text look like this:
 #	.IN "Pet Licenses"
 #	.IN "Shopping," "Food"
 #	.IN "Shopping," "Clothes"
 # Then, while running vtroff, one collects the standard error lines
 # containing the page number and up to two index item entries
 # which look like this: 
 #	1	Pet Licenses
 #	2	Shopping,	Food
 #	3	Shopping,	Clothes
 # They are piped to sort for sorting by keys,
 # then to uniq to remove duplicate lines,
 # then to awk, which applies reformatting to make lines like this:
 #      Pet Licenses ................................................1
 #      Shopping, Food ..............................................3
 (vtroff - -t > /dev/null) \
   |& sort -f -t	 +1 +2 +0n | uniq \
   | awk -F\	 \
   '{ sp="...................."; sp=(sp sp sp sp); x1=($2 " ");
 x1=(x1 $3); x2=substr(sp, length, 70-length); x1=(x1 x2);
 printf("     %s%s\n",x1,$1) } '
# Note: the arguments to awk above are really all on one long line....
  ---------------------------------------------------------------------

To Index