From 2c9c4ee6729afefe3a83fdbbf5c3654ccca84037 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 4 May 2011 00:29:36 +0000 Subject: [PATCH] Some math font changing commands only work in math mode, so let's assure to switch to math mode if needed. This helps avoiding latex errors (see http://thread.gmane.org/gmane.editors.lyx.general/69580) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38579 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathNest.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.2