I am trying to debug one my macro and finally I reduced it to the simplest form: it accepts an argument, wraps it with “set-bold”, “reset-bold” font requests and that’s all. But the problem is that I want to pass it multiple lines as 1 argument. I tried to embed “n” inside the string, but without success (I still don’t know if it’s possible). So, I switched to a diversion:
." Start a diversion to capture text
.di t1
aaa
bbb
.di
." Define a macro to print the diversion content in bold
.de MMM
.ft B
\$1
.
.ft R
..
." Use the macro to process and print the diversion (I am
." not sure about asciify too)
.asciify t1
.MMM *[t1]
and it prints
aaa
bbb
I.e. “bbb” is not bold! It was a problem to force it to print “bbb”, not only “aaa” (I tried .br
between lines but it seems only empty line works fine). And after this, I hit impossibility to bold ALL lines (in the case they are only 2).
So how to force it to make “bbb” bold, I have not idea. I don’t understand even why it happens. Usually such trick works but not with multi-line arguments.
How to fix this simple macro?