Printing man pages in A4 paper

romildo at uber.com.br romildo at uber.com.br
Tue Sep 7 23:46:16 UTC 2004


On Tue, Sep 07, 2004 at 07:32:38PM -0300, romildo at uber.com.br wrote:
> 
> I use the command line
> 
>    $ man -t setfont | lpr
> 
> to print the manual page for setfont. But the
> command "man -t setfont" outputs a PostScript
> file formated for letter paper.
> 
> How can I get it to format for A4 paper?

With some help and some searching, I came to this
solution:

The groff home page (http://www.gnu.org/software/groff/groff.html),
in the section "macro packages", tells about the option
"-dpaper=<size>" available to groff through the papersize.tmac file.

It is enough to edit /etc/man.conf and add the options
"-dpaper=a4 -P-pa4" to the line which reads
"TROFF/usr/bin/groff -Tps -mandoc", which becomes:

TROFF   /usr/bin/groff -Tps -dpaper=a4 -P-pa4 -mandoc

With this setup, the command "man -t setfont" will
output a PostScript file formatted for A4 paper by
groff.

This solution is better than using enscript because
it does typography considerations (by groff) when
producing the output.

Regards.

Romildo





More information about the users mailing list