Subject: Re: Stylewriter driver (was Re: xemacs printing)
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 09/03/1999 00:48:44
On Thu, 2 Sep 1999, Bill Studenmund wrote:
> On Thu, 2 Sep 1999, Guy Santiglia wrote:
>
> > How can I make it print the man pages correctly with the
> > second comand? I don't want to have to specify the path name
> > of the man page every time I have to print a man page.
>
> I think you'll have to. Sorry.
I've been thinking about that for some time, and now I believe I have
a solution. Since /usr/bin/nroff is simply a shell script, it's
trivial to patch in a hook for printing. You could either apply the
following patch to nroff directly, or patch a copy in /usr/local/bin,
also changing the path to nroff in /etc/man.conf accordingly. Then, in
[t]csh, "setenv PRINTMAN yes; setenv PAGER='lpr -Plpstylus'; man foo"
or sh, "export PRINTMAN=yes; export PAGER='lpr -Plpstylus'; man foo".
To disable, "unset[env] PRINTMAN; unset[env] PAGER". So far, I've only
tested this by leaving my PAGER set at "less"...
*** nroff.orig Thu Sep 2 23:54:00 1999
--- nroff Fri Sep 3 00:29:18 1999
***************
*** 3,10 ****
prog="$0"
# Default device.
! if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1"
! then
T=-Tlatin1
else
T=-Tascii
--- 3,11 ----
prog="$0"
# Default device.
! if [ "X$PRINTMAN" = "Xyes" ]; then
! T=-Tps
! elif [ "X$LC_CTYPE" = "Xiso_8859_1" ] || [ "X$LESSCHARSET" = "Xlatin1" ]; then
T=-Tlatin1
else
T=-Tascii