*BSD News Article 80814


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!cs.utexas.edu!newshost.convex.com!cnn.exu.ericsson.se!b04a08!not-for-mail
From: exujbm@exu.ericsson.se (Ben Madison)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to format man pages to lpr --- reasonably?
Date: 15 Oct 1996 23:48:21 GMT
Organization: Ericsson North America Inc.
Lines: 20
Message-ID: <5417s5$t49@cnn.exu.ericsson.se>
References: <53m1qp$3vq@taco.cc.ncsu.edu>
NNTP-Posting-Host: b04a08.exu.ericsson.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]

Bob Keys (rdkeys@unity.ncsu.edu) wrote:
> 
>   man <manpage> | a2ps -1 -a -i -m -p | lpr   was better but still had bad
> 
> fits with the backspace and underscores from the man pgm.  I can't seem to
> find any more options that should properly pass manpages through a2ps.  I 
> would have thought that the -i and -m options would have taken care of that.
> Perhaps an intermediate filter of some sort is required?

I use a little perl filter, "unman":

  #!/usr/local/bin/perl -n
  s/_[\b]//g;
  print;

Then just do:

  man <manpage> | unman | a2ps <whatever> | lpr

jbm