Red Hat Bugzilla – Bug 144043
groff silently defaults page length to A4 without general way to reconfigure it
Last modified: 2007-11-30 17:10:57 EST
Description of problem:
To dispell on the start any doubts 'locale -k LC_PAPER' on my machine
happens to print
which is a USletter size (for A4 that would be height=297, width=210).
Despite of that if one will do, for example and on attached demo,
groff -Tps -p chemstructs.pict
then viewing results, or printing, on a letter paper will have the
topmost structure cut in half. After a check of a generated PS this
is not suprise as in it there is 'def/PL 841.89', which is an A4 paper
height in Postscript points.
It turns out, which if far from clear from the man page, that one
can work around by doing
groff -Tps -P -g chemstructs.pict
which "guesses" page size and which works fine, or explicitely
groff -Tps -P -pletter chemstructs.pict
after which one see 'def/PL 792' as wanted here. Unfortunately
it does not look that one can set a desired default. In such
situation one would think that a "guessing" code should be used
unless some specific paper size was requested and not something
which in many locations will come up wrong.
The same issues actually affects 'man' as well. Pages printed
with 'man -t ...' on a letter paper are loosing a running head
(which is not that obvious until one looks closer). That particular
case likely can be worked around by putting into /etc/man.config
TROFF groff -Tps -man -P -g
instead of the current line but I do not see something similar
for the general case.
Version-Release number of selected component (if applicable):
Created attachment 109304 [details]
sample troff code which prints too high on a letter paper
This bug not only sits as NEW for the last nine months but is also present
in the current groff-18.104.22.168-5 from development series. It seems that
"guessing" should be really a default with an explicit size specification
as an override.
TROFF command in /etc/man.config from man-1.5p-6 (development too) also
does not provide a workaround but that should not be needed with groff
honouring a locale information.
Groff looks for paper size in /etc/papersize file, just run "echo letter >
/etc/papersize" and it should be ok.
> Groff looks for paper size in /etc/papersize file
Documentation is very far from that claim. 'man groff' does not mention
anything of that sort. In 'info groff', if one knows what to look for, it
is possible to find:
Alternatively, STRING can be a file name (e.g. `/etc/papersize');
in a format description of DESC files. So this STRING can be anything else
or may not show up at all.