[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented
From: |
Dave |
Subject: |
[bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented |
Date: |
Thu, 21 Apr 2022 23:57:44 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62346>
Summary: [PATCH] [gropdf] B0-B6 sizes don't work as
documented
Project: GNU troff
Submitted by: barx
Submitted on: Thu 21 Apr 2022 10:57:42 PM CDT
Category: Device gropdf
Severity: 2 - Minor
Item Group: Incorrect behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
== The problem ==
gropdf(1) says that gropdf's -p option "accepts the same arguments as the
papersize command. See groff_font(5) for details."
So we trundle over to groff_font(5) and read: "Recognized paper formats are
the ISO and DIN formats A0-A7, B0-B7, C0-C7, ..."
In fact, gropdf does not recognize the sizes B0 - B6 under those names, but it
_does_ recognize them under the alternate, undocumented names ISOB0 - ISOB6:
$ groff -Tpdf -P-pzzzz <<<'Hello.' | fgrep -a MediaBox # nonsense size, for
reference
/MediaBox [0 0 595 842 ]
$ groff -Tpdf -P-pb3 <<<'Hello.' | fgrep -a MediaBox # first attempt to
specify B3, fails
/MediaBox [0 0 595 842 ]
$ groff -Tpdf -P-pisob3 <<<'Hello.' | fgrep -a MediaBox # specify B3 using
secret name, works
/MediaBox [0 0 1001 1417 ]
The problem does not occur with the A and C names; these are recognized in
their unadorned form, as documented.
== The fix ==
The attached patch makes a simple edit to src/devices/gropdf/gropdf.pl that
seems to resolve this. With the modified gropdf in place, the new results
are:
$ groff -Tpdf -P-pzzzz <<<'Hello.' | fgrep -a MediaBox # nonsense size, for
reference
/MediaBox [0 0 595 842 ]
$ groff -Tpdf -P-pb3 <<<'Hello.' | fgrep -a MediaBox # first attempt to
specify B3, now works
/MediaBox [0 0 1001 1417 ]
It's unclear to me why the B names are different in the source code from the A
and C names; they've been that way since the file debuted in git (commit
87046b29 <http://git.savannah.gnu.org/cgit/groff.git/commit/?id=87046b29>), so
the commit history holds no clues. But someone had to go to extra effort to
put the extra characters before all the B names, so it seems like it must have
been done for some deliberate reason.
== Further blathering ==
groff_font(5) lists several other sizes that gropdf does not recognize at all,
but this is the subject of bug #62344. The B0-B6 bug could also conceivably
be considered under that one's purview: that bug requests synching the paper
sizes in various parts of the groff distribution, which could arguably cover
making them all use the same names as well. But that bug concerns itself
primarily with _adding_ paper sizes that are not currently recognized; the
present bug addresses some paper sizes that gropdf _does_ already recognize,
but only using undocumented forms of their names.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 21 Apr 2022 10:57:42 PM CDT Name: gropdf.papersize.patch Size:
655B By: barx
<http://savannah.gnu.org/bugs/download.php?file_id=53128>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62346>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented,
Dave <=
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Dave, 2022/04/24
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Deri James, 2022/04/24
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Dave, 2022/04/24
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Deri James, 2022/04/24
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Dave, 2022/04/25
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, G. Branden Robinson, 2022/04/26
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, Dave, 2022/04/26
- [bug #62346] [PATCH] [gropdf] B0-B6 sizes don't work as documented, G. Branden Robinson, 2022/04/27