[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem printing man pages



On Wed, Jan 29, 2003 at 05:26:16PM -0500, Wayne Topa wrote:
> I'm having a problem printing man pages.  They print with a leading 1m
> and other *m's and are really tough to read.  I remember Colin
> answered a question about this but, try as I might, I can't find the
> original post or the answer.

I'll answer it again then. :-)

It appears that you didn't accept the changes to groff's conffiles.
/etc/groff/man.local and /etc/groff/mdoc.local should both contain the
following macros (there should be copies in /etc/groff/*.dpkg-dist as
well, I think):

.if n \{\
.  \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
.  \" than utf8.
.  if !'\*[.T]'utf8' \
.    tr \[oq]'
.
.  \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
.  \" grotty.
.  if '\V[GROFF_SGR]'' \
.    output x X tty: sgr 0
.
.  \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
.  \" searching in man pages easier.
.  if '\*[.T]'utf8' \
.    char \- \N'45'
.\}

There are other ways: setting GROFF_NO_SGR=1 in the environment is a
simple one, or causing your pager to accept ANSI SGR escapes (less will
do so if given the -R option, for instance). The above is probably the
best fix until everything that accepts groff output has been fixed,
though.

By the way, if you're actually printing man pages to paper (I'm not sure
from your post if you mean printing to screen or printing to paper),
consider using the -t option to man to generate PostScript output.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: