[Top][All Lists]

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

Re: "absolute" vertical position seems awfully relative

From: Dave Kemper
Subject: Re: "absolute" vertical position seems awfully relative
Date: Fri, 25 Jun 2021 14:59:24 -0500

On 6/22/21, Tadziu Hoffmann <> wrote:
> 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.

This does indeed solve the problem for the simple test file I posted.
But I may have simplified my real-world problem too much; this fix
doesn't work in the circumstances where I'm actually seeing the

Here is a more complex test file using the -me macros.  It uses -me's
$H macro to define an action that should be done on every page, in
this case the printing of a bit of text at an "absolute" vertical

.mso e.tmac
.he ''header'      \" -me macro to define a header
.nr tf 1           \" make header roman
.de $H             \" -me macro called at the top of every page
\#  .br            \" Tadziu's trick
\v'|30000u'At 30,000 units.
.nr $v 127         \" -me register to set leading
Page one.
.nr $v 144
Page two.
.hx                \" -me macro to suppress header on next page
Page three.

Each page has a different combination of leading and presence/absence
of header.  And the absolute-positioned text on each page is in a
different place vertically.  (The difference is small, and you need to
compare pages carefully to see it.)

In this case, the .br that corrected the simpler example has no
effect: PostScript output is identical whether or not the .br line is
commented out.  Since here the \v'|...' is being run from inside a
macro called by a trap, it's not clear what causes the discrepancy, or
how to avoid it.

Is there a reliable way to specify an absolute vertical position?

reply via email to

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