Author: forenr Date: Wed May 4 15:07:32 2011 New Revision: 38580 URL: http://www.lyx.org/trac/changeset/38580
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/branches/BRANCH_2_0_X/src/mathed/InsetMathNest.cpp lyx-devel/branches/BRANCH_2_0_X/status.20x Modified: lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathNest.cpp ============================================================================== --- lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathNest.cpp Wed May 4 02:29:36 2011 (r38579) +++ lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathNest.cpp Wed May 4 15:07:32 2011 (r38580) @@ -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; Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x ============================================================================== --- lyx-devel/branches/BRANCH_2_0_X/status.20x Wed May 4 02:29:36 2011 (r38579) +++ lyx-devel/branches/BRANCH_2_0_X/status.20x Wed May 4 15:07:32 2011 (r38580) @@ -46,6 +46,8 @@ * DOCUMENT INPUT/OUTPUT +- Avoid LaTeX errors if font changing commands are used in the wrong mode + by assuring to switch to the right mode on export. * USER INTERFACE
