groff
[Top][All Lists]
Advanced

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

Re: [Groff] trying to understand .ad request


From: Werner LEMBERG
Subject: Re: [Groff] trying to understand .ad request
Date: Sat, 22 Sep 2012 23:25:41 +0200 (CEST)

> 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.)

Here's the added text to the CVS repository:

     Using `ad' without argument is the same as saying `.ad \[.j]'.  In
     particular, `gtroff' adjusts lines in the same way it did before
     adjusting was deactivated (with a call to `na', say).  For
     example, this input code


          .de AD
          .  br
          .  ad \\$1
          ..
          .
          .de NA
          .  br
          .  na
          ..
          .
          textA
          .AD r
          .nr ad \n[.j]
          textB
          .AD c
          textC
          .NA
          textD
          .AD         \" back to centering
          textE
          .AD \n[ad]  \" back to right justifying
          textF

     produces the following output:


          textA
                                                              textB
                                    textC
          textD
                                    textE
                                                              textF

> 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.

I suspect it is meant to have an easy sequence to do `.ad/.na/.ad'.
However, the current behaviour is certainly present in the old AT&T
troff also, so no chance to change it.


    Werner



reply via email to

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