[Top][All Lists]

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

Re: [Groff] trying to understand .ad request

From: Dave Kemper
Subject: Re: [Groff] trying to understand .ad request
Date: Sat, 22 Sep 2012 12:44:56 -0500

On Thu, Sep 20, 2012 at 11:32 PM, Werner LEMBERG <address@hidden> wrote:
> You've missed a paragraph in the documentation:
>      With no argument, `gtroff' adjusts lines in the same way it did
>      before adjusting was deactivated (with a call to `na', for
>      example).
> In other words, `.ad XXX' stores `XXX' in the \[.j] register, and
> emitting `.ad' without argument is the same as `.ad \[.j]', simply
> re-using the stored value in \[.j].  This is different to other
> requests which kind-of `pop' values from a stack if no arguments are
> present.

Thank you, Werner, that explains what's going on.  I didn't miss that
paragraph so much as misunderstand it, taking it to describe the "pop"
action familiar from other requests.  Reading more carefully now, I see it
doesn't say that, but the relevant detail -- which that paragraph implies,
but doesn't state explicitly -- is that .ad with no argument ONLY has an
effect when a prior .na has been issued.   Perhaps an additional sentence
along the lines of "If adjusting is active, issuing .ad with no argument
causes no change in the adjustment mode" would clarify this.  (Or perhaps
I'm the only one who had trouble following it as it reads now.)

I have to wonder why .ad works this way.  It seems the reversion action
familiar from other requests would be a more useful behavior in the
case of calling .ad with no argument while already in adjustment mode.
But I suppose changing it now brings up back-compatibility issues in
existing documents.

reply via email to

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