groff
[Top][All Lists]
Advanced

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

Re: "absolute" vertical position seems awfully relative


From: Tadziu Hoffmann
Subject: Re: "absolute" vertical position seems awfully relative
Date: Tue, 22 Jun 2021 14:59:11 +0200
User-agent: Mutt/1.11.4 (2019-03-13)

> At first blush this seems like a bug.  But Heirloom troff does the
> same thing, so maybe the so-called absolute position is relative in
> some obscure but intended way?

I think \v'|100000u' does not mean "space to an absolute vertical
position of 100000 units".  It means "space vertically a distance
corresponding to the difference between the current point and
the absolute vertical position of 100000 units".

Normally these would be equivalent in effect, except for the
combination of initial pseudo-page transition and trap-invoked
page header macro (which you don't have if you're using plain
groff and have not set one).

>From experiments I deduce the sequence of events to be similar to:

  1. The initial vertical position is 0.
  2. The distance from 0 to 100000u is computed;
     let's call this "x".
  3. Something is about to be output, so the trap is sprung and
     the point is set to a vertical position "y" by the macro.
  4. From "y", a distance of "x" is spaced, and then the text
     is output (at the seemingly wrong location).
  5. "bp" is invoked, a new page is begun, the top-of-page
     macro is executed, and the point is set to vertical
     position "y".
  6. The distance from "y" to 100000u is computed;
     let's call this "z".
  7. From "y", a distance of "z" is spaced, and then the text
     is output (at the correct desired location).

To prevent the surprising result on the first page, simply
begin the sequence with a ".br", which then initiates the
first page *before* performing the distance calculation.





reply via email to

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