Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2011 20:39:58 +0100
From:      Polytropon <freebsd@edvax.de>
To:        questions@freebsd.org
Cc:        David Kelly <dkelly@hiwaay.net>
Subject:   Re: How to adjust man page line length
Message-ID:  <20110118203958.033c4ead.freebsd@edvax.de>
In-Reply-To: <8162039A-6C07-4C88-928C-AAB4DD0FFCFE@hiwaay.net>
References:  <20110118034037.GF90952@weller-fahy.com> <8162039A-6C07-4C88-928C-AAB4DD0FFCFE@hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Jan 2011 06:48:13 -0600, David Kelly <dkelly@hiwaay.net> wrote:
> 
> On Jan 17, 2011, at 9:40 PM, David J. Weller-Fahy wrote:
> 
> > To expand on the question in the subject: How does one tell `man` not to
> > automatically format man pages to 80 columns?  I'm looking for a fairly
> > easy way to do this, or confirmation it would involve internal
> > gymnastics I may not be willing to perform.
> 
> Perhaps FreeBSD should look into using man from MacOS X where "man -c"
> will do as requested above. Will format to the output device width.
> 
> For FreeBSD I suspect the solution involves "man -t" and then studying
> how to tell groff(1) to format for one's console rather than the default
> Postscript output. "man -t" generates very nice printable man pages.

I'd like to mention - although this might not be a full
answer to the OP's initial question - that this is
similarly done when converting manual pages to PS or
PDF output for better printing.

man2pdf.sh:

	#!/bin/sh
	[ "$1" != "" ] && zcat `man -w $1` | \
	groff -Tps -dpaper=a4 -P-pa4 -mandoc | ps2pdf - $1.pdf

This would cause groff to format for A4 paper width.
It's fully possible that a similar approach can be used
for requesting a specific terminal width given in
characters, rather than inches or centimeters (from
a predefined value).


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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