lyndon@cs.AthabascaU.CA (Lyndon Nerenberg) (02/01/90)
In article <1990Jan31.205915.4709@gumby.cc.wmich.edu> peirce@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@cs.AthabascaU.CA UREP: Peru in disguise?
peirce@gumby.cc.wmich.edu (Leonard J. Peirce) (02/02/90)
In article <1637@atha.AthabascaU.CA> lyndon@cs.AthabascaU.CA (Lyndon Nerenberg) writes: >The UCB version of man recognizes some escapes in the ?roff source >that tell man(1) to invoke various preprocessors. The Ultrix man > [...] >It sure would be nice if Ultrix picked up the MANPATH feature.) Amen to that. >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 :-) Actually, this is the first manual page that I found that wouldn't format correctly with just nroff -man. I found a few others that wouldn't format correctly, too. Thanks to Bill Lynch (lynch@umunhum.stanford.edu) for telling me that tbl <file> | nroff -h -man - | col is what he uses. I tried it on the man pages that wouldn't format correctly with just nroff -man and they came out fine. -- Leonard J. Peirce Internet: peirce@gumby.cc.wmich.edu Western Michigan University peirce@gw.wmich.edu Academic Computer Center UUCP: ...!uunet!sharkey!wmichgw!peirce Kalamazoo, MI 49008 Phone: (616) 387-5469
grr@cbmvax.commodore.com (George Robbins) (02/07/90)
In article <1990Jan31.205915.4709@gumby.cc.wmich.edu> peirce@gumby.cc.wmich.edu (Leonard J. Peirce) writes: > What sequence is used to format manual pages on ULTRIX? Simply using > nroff -man xxx doesn't seem to work properly. I don't have sources so > 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. Just to mention the obvious, "man xxxx > foo" also formats the manual pages. It seems to recognize that the output isn't going to a terminal and do "hardcopy" formatting. Of course if you want troff or postscript output, you have to do it yourself... -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing: domain: grr@cbmvax.commodore.com Commodore, Engineering Department phone: 215-431-9349 (only by moonlite)
krueger@tacvax.mdcbbs.com (02/08/90)
> In article <1990Jan31.205915.4709@gumby.cc.wmich.edu> peirce@gumby.cc.wmich.edu (Leonard J. Peirce) writes: > What sequence is used to format manual pages on ULTRIX? Simply using > nroff -man xxx doesn't seem to work properly. I don't have sources so > 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. To see the method used to format the man pages on ULTRIX, look at the output of the command: /etc/catman -p This shows you exactly what is used by the OS to format the man pages. The basic catman(1) command will do all the formatting for you so that you get auto formatted results to man requests instead of waiting for the OS to do the nroff sequences each time. -- +----------------------------+---------------------------------------------+ | Ken Krueger | Voice: (714) 952-6151 | | McDonnell Douglas M&E | | | Internal Systems Support | Internet: krueger@tacvax.mdcbbs.com | | 5701 Katella Avenue | UUCP: uunet!tacvax.mdcbbs.com!krueger | | Cypress, CA 90630-5099 | PSI: PSI%31060099980024::KRUEGER | +----------------------------+---------------------------------------------+ | Be nice to me, or I'll tell my uncle Freddy... Sweet dreams... | +--------------------------------------------------------------------------+