Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2008 19:19:16 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        Gonzalo Nemmi <gnemmi@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: man -t odd page size
Message-ID:  <alpine.BSF.2.00.0810221902330.5789@wonkity.com>
In-Reply-To: <20081023023840.bdacc8b9.freebsd@edvax.de>
References:  <200810222156.20959.gnemmi@gmail.com> <20081023023840.bdacc8b9.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 23 Oct 2008, Polytropon wrote:

> On Wed, 22 Oct 2008 21:56:20 -0200, Gonzalo Nemmi <gnemmi@gmail.com> wrote:
>> Is there an easy way to get man to format the man page using plain good ISO
>> 216 standard A4 page size?
>
> My suggfestion for an attempt would be to first strip any control
> characters from the output of "man -P cat <entry>" and then pipe
> it to an ASCII to PDF converter (a2ps, if I remember correctly);
> this would remove any markups, I know, but would lead to a PDF
> output using the system's default paper size, A4 (I hope).

But groff can do A4.  Just as a first pass:

zcat `man -w ls` | groff -Tps -dpaper=a4 -P-pa4 -mandoc | ps2pdf - tmp.pdf

It produces the right media size in the PS file, but I can't really test 
it because I don't have any A4 paper.

Maybe there's a way to get man(1) to send different options to groff 
than -t, but I don't know it.

-Warren Block * Rapid City, South Dakota USA



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