diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 21bfdfeea2..8e04e2a5d9 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -371,6 +371,7 @@ MathData InsetMathNest::glue() const void InsetMathNest::write(WriteStream & os) const { + MathEnsurer ensurer(os, currentMode() == MATH_MODE); ModeSpecifier specifier(os, currentMode(), lockedMode()); docstring const latex_name = name(); os << '\\' << latex_name;