groff
[Top][All Lists]
Advanced

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

Re: [Groff] OT: \} considered as macro argument regarding register .$


From: Ralph Corderoy
Subject: Re: [Groff] OT: \} considered as macro argument regarding register .$
Date: Sun, 06 Jul 2014 09:35:25 +0100

Hi Carsten,

> > BTW, as well as \n(.$ including \} in its count, it naturally
> > follows that \$3, for example, is \}.
> 
> It would be consistent but not desirable.

I disagree, I think consistency is desirable in this case.

> And fortunately it is not the case. More often then .$ I use ".if
> ^G\\$3^G^G ...  " and this works in this case (\$3 is empty).

I agree it works, but \\$3 isn't empty, it only compares as empty
against another string.  ;-)

    $ cat endbrace.tr
    .de t3
    .tm \\$1/\\$3.
    .if '\\$3'' .tm empty
    .if !'\\$3'' .tm not-empty
    ..
    .t3 1 - x
    .t3 2 -
    .if t \{
    .t3 3 - \}
    .t3 3 - \}
    $
    $ groff -w all endbrace.tr >/dev/null
    1/x.
    not-empty
    2/.
    empty
    3/\}.
    empty
    3/\}.
    empty
    $

Cheers, Ralph.



reply via email to

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