Author: forenr
Date: Wed May  4 02:29:36 2011
New Revision: 38579
URL: http://www.lyx.org/trac/changeset/38579

Log:
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)

Modified:
   lyx-devel/trunk/src/mathed/InsetMathNest.cpp

Modified: lyx-devel/trunk/src/mathed/InsetMathNest.cpp
==============================================================================
--- lyx-devel/trunk/src/mathed/InsetMathNest.cpp        Wed May  4 02:17:07 
2011        (r38578)
+++ lyx-devel/trunk/src/mathed/InsetMathNest.cpp        Wed May  4 02:29:36 
2011        (r38579)
@@ -371,6 +371,7 @@
 
 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;

Reply via email to