Stefan Schimanski <s...@1stein.org> writes: >> I think that \global\newcommand works in any case. > > It does? I think I tried and it did not.
I might be wrong. I cannot find reference to that right now. > A second requirement: the distinction between \newcommand and > \renewcommand is very fragile. It is far from trivial to say whether a > macro is redefined in some cases. E.g., in a lyx comment a definition > will be ignored. LyX should skip macro definitions in comments anyway. >> It would be nice to make the case "all optional arguments are before >> required ones" work with plain \newcommand. > > What do you mean? I had a self-made \newcommand implementation that > could do that. But it is quite large (obviously), and it also look > strange to put that into the preamble. For that reason we switched to > xargs instead. Sorry, I was mistaken about what newcommand can do. I meant: "commands with one optional argument before the required ones". JMarc