+ parse2(cell->back(), FLAG_END, mode, false);
+ }
+
+ else if (name == "math") {
+ cell->push_back(MathAtom(new MathHullInset("simple")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, true);
+ }
+
+ else if (name == "equation" || name == "equation*"
+ || name == "displaymath") {
+ cell->push_back(MathAtom(new MathHullInset("equation")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, (name == "equation"));
+ }
+
+ else if (name == "eqnarray" || name == "eqnarray*") {
+ cell->push_back(MathAtom(new MathHullInset("eqnarray")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "align" || name == "align*") {
+ cell->push_back(MathAtom(new MathHullInset("align")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "flalign" || name == "flalign*") {
+ cell->push_back(MathAtom(new MathHullInset("flalign")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "alignat" || name == "alignat*") {
+ // ignore this for a while
+ getArg('{', '}');
+ cell->push_back(MathAtom(new MathHullInset("alignat")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "xalignat" || name == "xalignat*") {
+ // ignore this for a while
+ getArg('{', '}');
+ cell->push_back(MathAtom(new MathHullInset("xalignat")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "xxalignat") {
+ // ignore this for a while
+ getArg('{', '}');
+ cell->push_back(MathAtom(new MathHullInset("xxalignat")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "multline" || name == "multline*") {
+ cell->push_back(MathAtom(new MathHullInset("multline")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (name == "gather" || name == "gather*") {
+ cell->push_back(MathAtom(new MathHullInset("gather")));
+ parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+ }
+
+ else if (latexkeys const * l = in_word_set(name)) {
+ if (l->inset == "matrix") {
+ cell->push_back(createMathInset(name));
+ parse2(cell->back(), FLAG_END, mode, false);
+ }
+ }
+
+ else {
+ //lyxerr << "unknow math inset begin '" << name << "'\n";
+ // create generic environment inset
+ cell->push_back(MathAtom(new MathEnvInset(name)));
+ parse2(cell->back(), FLAG_END, mode, false);
+ }