On Tue, Sep 24, 2019 at 4:41 PM Pantxo Diribarne
<[email protected]> wrote:
> Now how would I go if I want to display the third argument in case it's
> supplied and the first in case arg3 is empty?
It's not very easy. The best I could come up was the following:
@c use arg1 if present, otherwise use arg2
@macro choosearg{arg1, arg2}
@set dummyflag
@inlineifclear{dummyflag\arg1\, \arg1\}
@inlineifset{dummyflag\arg1\, \arg2\}
@end macro
I tested that this works with spaces in the arguments, but this
doesn't work if arg1 has any @-commands in it: this could be avoided
if the node names don't have @-commands in them.