groff
[Top][All Lists]
Advanced

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

Re: [groff] Heirloom troff invoke macro from string


From: Mircea Hossu
Subject: Re: [groff] Heirloom troff invoke macro from string
Date: Fri, 04 Jan 2019 13:08:04 -0800

I didn't know that was possible. Yes, it would indeed solve my
problem. But, after a quick experiment, it seems to not behave this
way. The macro body gets expanded instead of executing:

.do xflag 3
.papersize a4
.mediasize a4
.ps 14p
.vs 24p
.
.nr x 0 1
.de m
.nr x +1
..
.ds s \\n+x
.ds t \\*m\\n+x

test1 \*s \*s \*s
.br
test2 \*t \*t \*t
.br


Output result:
  test1 1 2 3
  test2 .nr x +1 4 .nr x +1 5 .nr x +1 6

The goal would be to modify number "x" using some more complex
expression, e.g. in macro "m", at the point where string "t" is interpolated. 

Any ideas? 
Thanks!



reply via email to

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