Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 1999 20:22:33 +0200
From:      Gunnar Flygt <gunnar@pluto.sr.se>
To:        "Meissner, Norbert" <norbert.meissner@daimlerchrysler.com>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.org>
Subject:   Re: AW: Printing Manpages
Message-ID:  <19990504202233.A93711@sr.se>
In-Reply-To: <A991441F7BF5D111B2BB0008C7A410113D071B@sutgxs05.str.daimlerchrysler.com>; from Meissner, Norbert on Tue, May 04, 1999 at 11:57:52AM %2B0200
References:  <A991441F7BF5D111B2BB0008C7A410113D071B@sutgxs05.str.daimlerchrysler.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 04, 1999 at 11:57:52AM +0200, Meissner, Norbert wrote:
> hi folks,
> 
> the correct solution is (if a2ps is installed)
> 
>   man topic | a2ps -2 -m | lpr -P myprinter
> 
> for the options -2 -m read this cutout of the a2ps manpage:
> 
>        -m    Understand UNIX manual output ie: 66 lines per page,
> 
>              no line numbering and possible bolding and underlin-
> 
>              ing  sequences.  The  understanding  of  bolding and
> 
>              underlining is there by default even if  -m  is  not
> 
>              specified. 
>        -2    Print  two  pages per physical page (twinpage mode),   
>              side by side or up-down, depending on  the  printing   
>              mode (landscape or portrait).                          
> 
> I've done this many times and it works!

Actually it's much easier than that. I do:
man $1 | a2ps  where $1 is the input to the printman file (as you all
understood) The defaults for a2ps is to print two sides on each paper
and use the default printer.

> > -----Ursprüngliche Nachricht-----
> > Von:	Greg Lehey [SMTP:grog@lemis.com]
> > Gesendet am:	Dienstag, 4. Mai 1999 09:22
> > An:	Norbert Meissner
> > Cc:	cjclark; freebsd-questions
> > Betreff:	Re: Printing Manpages
> > 
> > [Format recovered--see http://www.lemis.com/email/email-format.html]
> > 
> > On Tuesday,  4 May 1999 at  8:55:14 +0200, Meissner, Norbert wrote:
> > >> On Dienstag, 4. Mai 1999 06:23, Crist J. Clark
> > <cjc@cc942873-a.ewndsr1.nj.home.com> wrote:
> > >>
> > >> I want to print out some long manpages. I know how to convert a
> > >> manpage to Postscript and print it quite easily,
> > >>
> > >>> man -t topic | lpr
> > >>
> > >> Where 'topic' is the page of choice.
> > >>
> > >> However, I'd like to print two columns on a page (two manpage pages
> > >> per page of paper). I know of a kind of ugly work around,
> > >>
> > >>> gunzip -c /usr/share/man/man1/topic.1.gz | groff -man -Tascii |
> > enscript -2r
> > >>
> > >> But that is an ugly command line and the output is not too pretty
> > >> either (it works, but unless enscript gets some tweaking, page breaks
> > >> and other things are off).
> > >>
> > >> Anyone have a better way to convert manpages to a pretty two column
> > >> per page form? Perhaps piping through gs somehow (the word 'column' is
> > >> not even on 'man gs' so I don't know where to start there)? Or maybe
> > >> enscript is the right tool with some different options?
> > >
> > > have a look at a2ps (a4 or letter size, what you prefer) at the ports.
> > it
> > > just does what you want, especially for man pages. if you haven't any
> > > ps-printer you should also have a look at ghostscript.
> > 
> > The problem with this solution is that it's not troff, it's nroff, and
> > it *still* needs PostScript.
> > 
> > The correct solution (some assembly required) is to massage the
> > PostScript to print left and right.  I do something similar for proofs
> > of "The Complete FreeBSD", where I print four thumbnails on a page,
> > but it would take a lot of work to change that to two per page, which
> > is why I didn't answer before.
> > 
> > Greg
> > --
> > See complete headers for address, home page and phone numbers
> > finger grog@lemis.com for PGP public key
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
                           __o
regards, Gunnar       ---_ \<,_
email: flygt@sr.se ---- (_)/ (_)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990504202233.A93711>