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 va
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
Thank you, Tadziu, it is an interesting trick and it does work in the
test case posted earlier. Unfortunately, in a more realistic document,
I did hit those "unexpected results", e.g. when the string was used
inside a macro argument (thank you for the warning).
The final solution I picked was to c
I do not have experience with online collaborative programming, so I
just opened a github account and created an issue regarding this,
along with source code and a few more examples:
Suggestion: adding external scripting support to troff:
https://github.com/n-t-roff/heirloom-doctools/issues/82
Wo
Just signalling the only limitation I've hit yet regarding non-pdf
images (Heirloom troff): transparent background. (If anyone knows a
workaround, please share).
Program bmpp (part of dktools) also makes nice conversions to eps:
- https://sourceforge.net/p/dktools/wiki/bmpp%20manual/
- https://www
If the text "GROFF and Friends" was initially a standalone image which
was stacked on top of another image, it seems like it's exactly the
goal. Would it be possible to share how you achieved this, i.e. how to
"wrap a bitmap in custom Postscript code"? Even if it's manually
tedious, it would be ok.
Thank you, Boss and Robert, especially Boss for the full example.
Given that Heirloom troff works well with EPS (level 3) images with
transparency, and it's fairly simple, the limitation of not accepting
PDF images now seems less restrictive.
Just for completeness, some details I found while testi
Hello,
Before creating a bug report, I would like to verify that I am not
misunderstanding something and that this is indeed a bug.
It appears that a word starting with a period or apostrophe is
interpreted as a request/macro call even if it does not start at the
beginning of the line, under the
Thank you, Branden and Tadziu. It would seem this particular issue
is most closely related to the investigation performed by Tadziu.
Based on this, if I understand correctly, without further knowledge
whether some arbitrary text would be passed through a diversion or not,
one must make sure he es