FYI, I tried with these examples:
1 \newcommand{\foo}{42} $\foo 1{23}345$
2 \newcommand{\foo}[1]{(#1)} $\foo 1{23}345$
3 \newcommand{\foo}[1]{(#1|#1)} $\foo 1{23}345$
4 \newcommand{\foo}[2]{(#1|#2)} $\foo 1{23}345$
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$
7 \def\foo{42} $\foo 1{23}345$
8 \def\foo#1{(#1)} $\foo 1{23}345$
9 \def\foo #1{(#1)} $\foo 1{23}345$
10 \def\foo#1#2{(#1|#2)} $\foo 1{23}345$
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$They work fine, i.e. 1,2,3,4,7,8,9,10 are converted into MathMacros.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.
Stefan
PGP.sig
Description: Signierter Teil der Nachricht
