Open theseanl opened 1 year ago
That would be a welcome PR :-).
It looks like, after you figure out how to grab the default arg when parsing the macro string, a little modification to
should be most of what is needed.
Please include some tests with your PR :-D
I'm trying to write some custom plugins for transforming latex, and so far, I really liked your work, especially in how you provide every required toolsets via modular package structure. While experimenting with it, I noticed that currently there's no support for macros with default arguments.
Then the result will be
where the expected output would have two identical lines of
bar,baz
.In
unified-latex-util-macros
, an xpase-style signature is computed, but it produceso
irrespective of the presence of a default argument. I've also noticed that manually passingO{bar} m
via\NewDocumentCommand
still produces unexpected results, so there should be another issue regarding macro expanders.It'd be nice if this support can be added. I'm wondering to know if there's any blocker for implementing it, I'm interested in sending a PR.