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/branches/BRANCH_2_0_X@38580 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-05-04 13:07:32 +00:00
parent 502444af31
commit b1fbf9c6a8
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -46,6 +46,8 @@ What's new
* 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