]> git.lyx.org Git - features.git/commitdiff
math macros do not understand \newcommand* and \renewcommand*
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 7 Jan 2011 20:21:10 +0000 (20:21 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 7 Jan 2011 20:21:10 +0000 (20:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37148 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/test/test-insets.tex
src/tex2lyx/text.cpp

index e59e32d8824d9a702f47f37c0f72a2d40ee1139c..a8fad94a34a8860224ca6b7cc95f343b446ff299 100644 (file)
@@ -246,9 +246,11 @@ global long def \global\long\def\macrod#1{d #1 d}
 providecommand \providecommand{\macroe}[1]{e #1 e}
 newcommand \newcommand{\macrof}[1]{f #1 f}
 renewcommand \renewcommand{\macrof}[1]{g #1 g}
+newcommand* \newcommand*{\macroh}[1]{h #1 h}
+renewcommand* \renewcommand*{\macroh}[1]{i #1 i}
 
 Now use them all:
-\macroa{x} \macrob{x} \macroc{x} \macrod{x} \macroe{x} \macrof{x}
+\macroa{x} \macrob{x} \macroc{x} \macrod{x} \macroe{x} \macrof{x} \macroh{x}
 
 \section{Special formattings\index{Special formattings}}
 
index 37c4fcd3b9b16176502ff59f792f6f29bbc93f68..be604629b399e4e47c445552a89fbc725acc242d 100644 (file)
@@ -2828,7 +2828,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                           opt1 + opt2 +
                                           '{' + p.verbatim_item() + '}';
 
-                       if (t.cs() == "providecommand")
+                       if (t.cs() == "providecommand" ||
+                           name[name.length()-1] == '*')
                                handle_ert(os, ert, context);
                        else {
                                context.check_layout(os);