[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with number registers
From: |
Dave Kemper |
Subject: |
Re: Problems with number registers |
Date: |
Tue, 11 Jan 2022 00:53:21 -0600 |
On 1/10/22, Robert Marks <robert.marks@gmail.com> wrote:
> but then
>
> .nr a 1
> .nr a +1
> .tm a = \na
> .nr aa 17
> .tm aa = \n(aa
>
> give zeros:
>
> a = 0
> aa = 0
Robert,
Like Branden, I also get 2 and 17 from this input -- *if* the above
snippet is at the top level; that is, not inside a macro definition.
If it is part of a macro, I do get the 0 and 0 you're seeing.
To fix it, you need to double the backslash in front of the "n" so
that the register is interpolated at the time the macro is called,
rather than when it's defined. See the "Copy-in Mode" section of
"info groff" for further details.