How are manual pages formatted?

Lyndon Nerenberg lyndon at cs.AthabascaU.CA
Thu Feb 1 15:58:11 AEST 1990


In article <1990Jan31.205915.4709 at gumby.cc.wmich.edu> peirce at gumby.cc.wmich.edu (Leonard J. Peirce) writes:
>I can't look for myself but a strings on /usr/ucb/man shows some printf
>formats that look like man is using a sequence of tbl and col followed by
>nroff.

The UCB version of man recognizes some escapes in the ?roff source
that tell man(1) to invoke various preprocessors. The Ultrix man
pages don't document this, however the following information extracted
from the SunOS man(1) man page summarizes it:

  Preprocessing Manual Pages
     If the first line is a string of the form:
	  '\" X
     where X is separated from the the " by a  single  space  and
     consists  of  any combination of characters in the following
     list, man pipes its input to troff(1)  or	nroff(1)  through
     the corresponding preprocessors.
	  c    cw(1), where available
	  e    eqn(1), or neqn(1) for nroff
	  p    pic(1), where available
	  r    refer(1)
	  t    tbl(1), and col(1) for nroff
	  v    vgrind(1)
     If eqn or neqn is invoked, it will  automatically	read  the
     file /usr/pub/eqnchar (see eqnchar(7)).

Without checking the 4.3 sources, I can't say which of the above
are SunOS specific. (Sun has hack on the man command a bit. It
sure would be nice if Ultrix picked up the MANPATH feature.)

The funny part of this is, although "man 7 man" doesn't document
this feature under Ultrix, the Ultrix man(7) man page expects tbl
to be invoked ahead of nroff when formatting it :-)  Ultrix man
also seems to use a different set of escape sequences. Or maybe
the man(7) man page was designed to be run through a different
script to print the hardcopy manuals, and never modified for
compatibility with man(1).

[ All the above comments refer to Ultrix 2.1 and SunOS 3.5.
  Your mileage may vary. ]
-- 
Lyndon Nerenberg  VE6BBM / Computing Services / Athabasca University
     {alberta,decwrl}!atha!lyndon || lyndon at cs.AthabascaU.CA

                     UREP: Peru in disguise?



More information about the Comp.unix.ultrix mailing list