man -t to lpr

Jim Sims sims at cam.nist.gov
Sun Oct 14 09:29:08 AEST 1990


First of all, thanks to all who have responded. Since all
responses have been to this newsgroup, I don't think I need
to summarize. 

I still haven't found the solution I'm looking for, so let
me try to restate what I want to do: 

IF I had lp set up, man -t would give me very beautiful troff 
formatted man pages output to a postscript printer on the 
network. I have all of the requisite nroff/troff/psroff etc 
software (Documentor's Workbench Option and LaserWriter Option).
However, I don't want to use lp. It seems to me that the
whole point of the 3.3 lpr implementation is that I should be
able to use lpr instead of lp. However, I think I have discovered
a "fly-in-the-ointment". man -t outputs to the default
lp printer, with no apparent way to change this to have
it output to the default lpr printer. I have been looking
at man on our Suns and the Suns have an environment variable,
TCAT, which would let me do exactly what I want to do. The TCAT
environment variable specifies "The name of the program to use
to display troffed manual pages.  If not set, `lpr -t'
is used. If SGI had this envrionment variable, I could do a
		setenv TCAT 'lpr -t'
and this would give me what I want:  man -t's troff binaries
would be piped to lpr with the appropriate flag set so that
everything would magically come out right on the postscript
printer (I think). The TCAT environment variable seems like
a good idea, since it adds flexibility, so, SGI, please add
in a future release. Without this environment variable, can
anyone see how to do the same thing? 

Incidentally, I've also discovered a neat feature in catman
on the suns. I realize that catman isn't really relevant here,
since we are shipped the results of catman. However, catman
has a -p option for "tell me what you are going to do, rather
than doing i"t. One line of the output of catman -p l is
nroff -Tlpr -man manl/plt.l > catl/plt.l
If the man command on the SGI's had a similar -p option,
telling me what it does to those *.z files (or if someone
else can tell me), then perhaps I could write a simple script.


-----------------------------------------------------------------------
NAME:   James S. Sims                    TELE: (301) 975-2710
USMAIL: National Institute of Standards and Technology
(formerly National Bureau of Standards)  ARPA,BITNET: sims at enh.nist.gov



More information about the Comp.sys.sgi mailing list