math macros do not understand \newcommand* and \renewcommand*

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37148 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2011-01-07 20:21:10 +00:00
parent 6ead3daac9
commit f8f69ca920
2 changed files with 5 additions and 2 deletions

View 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}}

View 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);