[comp.sources.wanted] How do you print a man page???

randyc@hpfcdc.HP.COM (Randy Campbell) (02/03/90)

Most UN*X manpages use nroff with macros defined in an "an" macro package,
(hence nroff -man).

If your system lacks a man command it may well lack the macros...

If you have the macro package, "nroff -man 'file_name' | more | lp" 
will give you pretty troff-like output (your printer must be set to
66 lines per page or page breaks may be in the wrong place).

If you don't have the macros, and can't get them, you may have severe
difficulty getting a good-looking printout.

	Randy "just passing through" Campbell

charlie@milton.acs.washington.edu (Charles Geyer) (02/05/90)

In article <5450004@hpfcdc.HP.COM> randyc@hpfcdc.HP.COM (Randy Campbell) writes:

> Most UN*X manpages use nroff with macros defined in an "an" macro package,
> (hence nroff -man).
>
> If your system lacks a man command it may well lack the macros...

  % man 7 man

should describe the macros if they are there.

> If you have the macro package, "nroff -man 'file_name' | more | lp" 
> will give you pretty troff-like output (your printer must be set to
> 66 lines per page or page breaks may be in the wrong place).

Yes, and

  troff -man file

will give actual troff output (or ptroff, or psroff, or whatever roff) that
looks exactly like the manual.

Note that the file is the *roff file for the actual man page, for example
to print the man page for ls do

  % whereis ls
  ls: /bin/ls /usr/man/man1/ls.1
  % troff -man /usr/man/man1/ls.1  

root@cca.ucsf.edu (Systems Staff) (02/07/90)

In article <5450004@hpfcdc.HP.COM>, randyc@hpfcdc.HP.COM (Randy Campbell) writes:
> ...
> If you have the macro package, "nroff -man 'file_name' | more | lp" 
> ...

You may want the pipe into more to view the nroff result or the pipe
into lp to print it, but the combination is unlikely to give you very
useful results.

 Thos Sumner       Internet: thos@cca.ucsf.edu
 (The I.G.)        UUCP: ...ucbvax!ucsfcgl!cca.ucsf!thos
                   BITNET:  thos@ucsfcca

 U.S. Mail:  Thos Sumner, Computer Center, Rm U-76, UCSF
             San Francisco, CA 94143-0704 USA

I hear nothing in life is certain but death and taxes -- and they're
working on death.

#include <disclaimer.std>