[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] vertical resolution and page location traps
From: |
Werner LEMBERG |
Subject: |
Re: [groff] vertical resolution and page location traps |
Date: |
Sat, 16 Jun 2018 00:24:32 +0200 (CEST) |
>> The actual numbers returned under various conditions add only more
>> confusion.
>>
>> $ groff -Tascii <<< '.tm \n(.V' > /dev/null
>> 40
>> $ groff -Tps <<< '.tm \n(.V' > /dev/null
>> 1
>> $ groff -Tpdf <<< '.tm \n(.V' > /dev/null
>> 1
>>
>> I don't see how the vertical resolution of the ascii device can be
>> 40 times that of the ps and pdf devices.
>
> It's the opposite. A ps driver has 40 times larger resolution than
> the ASCII device.
Oops, this is wrong, sorry, see below.
I agree that the explanation of \n[.H] and \n[.V] is a bit sparse.
For ASCII, groff uses 240 horizontal units per inch (see below).
However, everything gets rounded to a multiple of \n[.H] (which is
40).
As a corollary, the PS driver's horizontal resolution is 7200 times
larger than the ASCII device.
.nr foo 1i
.tm \n[foo]
gives 240 for -Tascii and 72000 for -Tps. Both values must be divided
by the output driver's \n[.H] value, yielding the above ratio.
Werner