#include "InsetMathCancel.h"
#include "InsetMathCancelto.h"
#include "InsetMathCases.h"
+#include "InsetMathClass.h"
#include "InsetMathColor.h"
#include "InsetMathDecoration.h"
#include "InsetMathDots.h"
brace = true;
}
os.textMode(true);
- } else if (macro && brace && !textmode_macro) {
+ } else if (macro && brace && !needs_mathmode && !textmode_macro) {
// This is a user defined macro, not a MathMacro, so we
// cannot be sure what mode is needed. We leave it in the
// same environment it was entered by closing either \lyxmathsym
return MathAtom(new InsetMathSpecialChar(s));
if (s == " ")
return MathAtom(new InsetMathSpace(" ", ""));
-
if (s == "regexp")
return MathAtom(new InsetMathHull(buf, hullRegexp));
+ MathClass const mc = string_to_class(s);
+ if (mc != MC_UNKNOWN)
+ return MathAtom(new InsetMathClass(buf, mc));
+
return MathAtom(new MathMacro(buf, s));
}
InsetSpace::string2params(to_utf8(str), isp);
InsetSpace is(isp);
odocstringstream ods;
- otexstream os(ods, false);
+ otexstream os(ods);
Encoding const * const ascii = encodings.fromLyXName("ascii");
OutputParams op(ascii);
is.latex(os, op);