First, I like your patch and give an OK.

> FYI, I tried with these examples:

> 5 \newcommand{\foo}[2][\frac{1}{2}]{(#1|#2)} $\foo 1{23}345$
> 6 \newcommand{\foo}[2][\frac{1}{2}]{(#1|#2)} $\foo 1{23}345$

What is the difference?

Only for information: Why can't this and 5 and 6 not be imported into a 
MathMacro?:

> 11 \def\foo A#1B{(#1)} $\foo 1{23}345$
> 12 \def\foo#1..#2{(#1|#2)} $\foo 1{23}345$
> 13 \def\foo#1#3{(#1|#2)} $\foo 1{23}345$
> 14 \def\foo#1#1{(#1|#2)} $\foo 1{23}345$
>
> A recursive macro like \def\foo#1{\def\baa{#1}} is parsed, creating first the \baa MathMacro, then > the \foo MathMacro with a \baa MathMacro inside. I think we have to exclude this case, i.e. a
> recursive macro should go into an ERT as well.

Why do you think it should be excluded? Currently I can create recursive MathMacros I only have to assure the correct definition order.

---

Btw. while you are working on this stuff: I pointed out in bug 1394
http://bugzilla.lyx.org/show_bug.cgi?id=1394
that it is annoying that the definitions aren't placed to the document preamble. There should at least be an option to put the definitions t the preamble, there is no reason why this is not allowed.

regards Uwe


Reply via email to