groff
[Top][All Lists]
Advanced

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

Re: .SPACE in mom


From: Peter Schaffter
Subject: Re: .SPACE in mom
Date: Tue, 9 Nov 2021 11:49:54 -0500
User-agent: Mutt/1.9.4 (2018-02-28)

Ulrich --

Email to your address is being returned undelivered.  I have no
idea why.  Yours is the only address that fails and I have made no
changes to my email configuration.  I'm replying on the list to make
sure you see my replies.

On Tue, Nov 09, 2021, Ulrich Lauther wrote:
> 
> Thanks a lot. I wrote a macro to achive my goal that works in both directions,
> depending on the sign of its argument:
> 
> .\" Goto position relative to top or bottom of page 
> .\" depending on sign of argument:
> .\" Example: .Goto -3c
> .
> .MAC Goto END
> .  nr tmp \\$1
> .  if \\n[tmp]<0 \{\
> .    nr tmp \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]+\\n[tmp]
> .  \}
> .  SP |\\n[tmp]u
> .END
> 
> Any comment or improvement?

.SP (or the groff request .sp) adds the current linespace (\n[.v]) to
the requested distance when | is used, for which compensation needs
to be applied:

  .SP |(\\n[tmp]-\\n[.v])u

I would also suggest protecting the request by disabling vertical
position traps:

  .vpt 0
  .SP |(\\n[tmp]-\\n[.v])u
  .vpt

-- 
Peter Schaffter
https://www.schaffter.ca



reply via email to

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