+ Token const & n = getToken();
+ if (n.cat() == catMath) {
+ error("something strange in the parser");
+ break;
+ } else {
+ // This is inline math ($...$), but the parser thinks we are
+ // already in math mode and latex would issue an error, unless we
+ // are inside a text mode user macro. We have no way to tell, so
+ // let's play safe by using \ensuremath, as it will work in any case.
+ putback();
+ cell->push_back(MathAtom(new InsetMathEnsureMath(buf)));
+ parse(cell->back().nucleus()->cell(0), FLAG_SIMPLE, InsetMath::MATH_MODE);
+ }