[Novalug] Printing man pages question

James Ewing Cottrell 3rd JECottrell3 at Comcast.NET
Wed Nov 24 10:01:40 EST 2010


  On 11/21/2010 9:43 PM, Jon LaBadie wrote:
> On Sun, Nov 21, 2010 at 08:07:37PM -0500, James Ewing Cottrell 3rd wrote:
>>    On 11/20/2010 2:14 AM, Jon LaBadie wrote:
>>> On Fri, Nov 19, 2010 at 11:21:53PM -0500, cmhowe at patriot.net wrote:
>>>> List,
>>>>
>>>> I want to have a hard copy of a man page. If, for example, I do
>>>>
>>>>     man gedit>gedit-manual
>>>>
>>>> then
>>>>
>>>>     lpr gedit-manual
>>>>
>>>> I get something so unattractive that it is useless. I could edit it but I
>>>> have a hunch that there is a program to make it attractive. Does anyone
>>>> know of a program that does that?
>>> According to the man manpage, the -t option should do what you want.
>>>
>>>      man -t gedit>   gedit.ps
>>>      lp gedit.ps
>>>
>>>      man -t gedit | lp
>>>
>>> Jon
>> You are probably right. But I always use "a2ps" to send things to the
>> printer:
>>
>> man whatever | a2ps -m
>>
>> The -m option processes the data like a manpage. You can also use -2 to
>> get two column output in landscape mode
>> and -s2 to get double sided printing.
>>
> The distinction is in the original formatting.  Using ancient program
> equivalents, "man whatever" does "nroff -man" while "man -t whatever"
> does "troff -man".  I.e. ASCII text formatted vs. typesetter formatted.
> The initial formatting has the potential to be prettier/fancier with
> the troff typesetting.
>
> The output of "man whatever" is simple text, viewable with cat, more,
> etc. and probably could be sent directly to a 6 line per inch printer.
> Or as you show, converted to postscript before printing.  In contrast,
> the output of "man -t whatever" is already postscript.  To view it
> on the screen would require a program like ghostview.
>
> jon
I couldn't have said it better. Thank you for clearly stating what I was 
implying. I don't really trust that the "ancient format" stuff will be 
there, work correctly, or even line up. Bell, Berkeley, the UNIX 
vendors, and the Linux people have all taken their shot at meddling with 
them, and what we have is a loose collection of mostly-standard macros 
and formatting tools and macros that work most of the time on most any 
manpage you can find.

By contrast, the output of a normal man command is ASCII.

As for printing, In My Head (which is really where I live, certainly not 
The Real World) there is only One Printer:  Network PostScript. Makes it 
a lot easier picking Printer Drivers.

JIM



More information about the Novalug mailing list