Bug 144043 - groff silently defaults page length to A4 without general way to reconfigure it
groff silently defaults page length to A4 without general way to reconfigure it
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: groff (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-03 19:36 EST by Michal Jaegermann
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-01 08:24:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample troff code which prints too high on a letter paper (8.57 KB, text/plain)
2005-01-03 19:39 EST, Michal Jaegermann
no flags Details

  None (edit)
Description Michal Jaegermann 2005-01-03 19:36:22 EST
Description of problem:

To dispell on the start any doubts 'locale -k LC_PAPER' on my machine
happens to print

height=279
width=216

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):
groff-1.18.1.1-3
Comment 1 Michal Jaegermann 2005-01-03 19:39:12 EST
Created attachment 109304 [details]
sample troff code which prints too high on a letter paper
Comment 2 Michal Jaegermann 2005-09-03 19:47:30 EDT
This bug not only sits as NEW for the last nine months but is also present
in the current groff-1.18.1.1-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.
Comment 3 Miroslav Lichvar 2006-02-01 08:24:39 EST
Groff looks for paper size in /etc/papersize file, just run "echo letter >
/etc/papersize" and it should be ok.
Comment 4 Michal Jaegermann 2006-02-01 11:21:44 EST
> 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.

Note You need to log in before you can comment on or make changes to this bug.