[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] Heirloom troff invoke macro from string
From: |
Mircea Hossu |
Subject: |
[groff] Heirloom troff invoke macro from string |
Date: |
Fri, 04 Jan 2019 11:02:55 -0800 |
Is it possible in Heirloom troff to invoke a macro from a string?
There is an escape sequence:
\R'R ±N' => Set number register R to ±N
This is useful, but the expression is too limiting in some cases. For
example, is it possible to increase register R by 1 only if it hasn't
reached a maximum value?
There is also an output line trap escape sequence:
\Px,\P(xx,\P[xxx] => Output-line trap x, xx, or xxx
This is very useful (and very close), but there are situations where
one would need for that macro to be invoked at that *exact* location, as
opposed to later, when the text is printed.
Thank you!
- [groff] Heirloom troff invoke macro from string,
Mircea Hossu <=