Jean-Marc Lasgouttes wrote: > MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs, > string const & type, MathArray const & ar1, MathArray const > & ar2) : MathNestInset(2), numargs_(numargs), name_(nm), type_(type) { > + initMath(); > + > if (numargs_ > 9) > lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of > arguments: " << numargs_ << std::endl; > @@ -54,6 +58,8 @@ MathMacroTemplate::MathMacroTemplate(str > MathMacroTemplate::MathMacroTemplate(std::istream & is) > : MathNestInset(2), numargs_(0), name_() > { > + initMath(); > + > MathArray ar; > mathed_parse_cell(ar, is); > if (ar.size() != 1 || !ar[0]->asMacroTemplate()) {
These two calls cause the delay, also if you enter a normal formula in LyX for the first time (have a look at the console messages). AFAICS they are not necessary to get the test file loaded. Isn't the following sufficient? For me, it fixes the problem. > MathMacroTemplate::MathMacroTemplate() > : MathNestInset(2), numargs_(0), name_(), type_("newcommand") > -{} > +{ > + initMath(); > +} > Jürgen