[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: groff: gropdf, unlike grops, does not understand com10 paper size
From: |
Dave Kemper |
Subject: |
Re: groff: gropdf, unlike grops, does not understand com10 paper size |
Date: |
Sun, 17 Apr 2022 13:33:04 -0500 |
On 4/12/22, Ralph Corderoy <ralph@inputplus.co.uk> wrote:
> The enhancement is to replace the code in
> https://git.savannah.gnu.org/cgit/groff.git/tree/src/libs/libgroff/paper.cpp,
> including the generation by code of A0 to A7 from A0's size and so on
> for {B,C,D}0, and replace it with a text file which code reads
> regardless of the code's programming language.
Paper sizes are actually hard-coded three (that I've found) different
places in the groff source tree, for three languages:
(1) src/libs/libgroff/paper.cpp (some sizes generated algorithmically): C++
(2) src/devices/gropdf/gropdf.pl: Perl
(3) tmac/papersize.tmac: roff
All three of these sets contain these sizes:
ledger
legal
letter
a0-a6
b0-b6
c0-c6
Sets (1) and (3) additionally include:
d0-d6
tabloid
statement
executive
com10
monarch
dl
Sets (1) and (2) additionally include a7.
Exclusive to set (1) are b7, c7, d7.
Exclusive to set (2) are a8-a10.
So yeah, ideally all three of these lists would be generated from one
master source and all match each other.
> There's also a libpaper though I don't know how widely it's available.
I don't know that either, but yes, it might be nice if groff didn't
have to store this information itself at all, but could call upon a
standard library that knows all the paper sizes.
However, the libpaper on my system (1.1.24), while including many
other sizes not listed above, also omits some of the sizes groff
currently includes, such as c0-c1 and all the d sizes. I've no idea
how common these are in real life.