bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A4 page size woes


From: joerg van den hoff
Subject: Re: A4 page size woes
Date: Tue, 19 Jul 2022 22:59:30 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 19.07.22 16:27, Bjarni Ingi Gislason wrote:>    Your observation is right.
>
>    This is how groff is designed to do.
>
>    The x-axis for input is on the first usable line for the output medium
> and that is one text baseline below the upper border of the physical
> output medium (paper, screen).
>
>    Meaning: y coordinate for the this (first) baseline is one vee (1v)
> (vee: name of the letter v V).
>
>    See with (using the -Z option for groff shows the vertical (V)
> coordinate of the baseline)
>
> .sp |0c
> Text
>
>    If
>
> .sp |<page length>
> Text
>
>    the "Text" is put below the bottom border by 1v.
>
>    So
>
> .sp |(<page length>-1v)
> Text
>
>    puts the text on the bottom border.
>
>    To get the same distance of the text baseline at the bottom as at the
> upper border move the line 1v up or
>
> .sp |(<page length>-1v-1v)

understood. thanks for the clarification.

>
> N.B.
>
>    The "top of a page" is not the same as the "top of a paper (screen)"
>
>    Macro packages have header and footer macros.

sure. it just took me by surprise that setting .pl to A4 size for a device using A4 (specifically: grops) does *not* do the expected thing. I am not sure were in the docs (report54, groff book, manpages) this difference between "upper left corner of paper" and "position (0,0) on page" is
explicitly explained.

and regarding a4.tmac setting page height and width to the actual A4 
dimensions: the latter (width)
is just fine, the former is not, in my view, since it extends, as you also 
explain, the page beyond
the device/paper boundary at the bottom and is thus simply not doing what the 
user
expects. the "hard" offset at the top should be mirrored by a "soft" offset at the bottom in my view. therefore, I really would think that doing the "-2v" subtraction should be done in a4.tmac already so that page layout would be corrected for that 1v offset at the top out of the box. or why is this a bad idea? (I also wonder: does the same issue happen with us letter and 11i page height
or is it handled internally in this case?).

>
>    Get the "Troff User's Manual (CSTR #54)" from
> "https://troff.org/54.pdf";.

yes, thanks. I do have that already (just coming back to troff in some earnest after a several years hiatus).

>    The "|" is explained in paragraph 1.3.

that much I know ... ;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]