Do not prematurely close \ensuremath or \lyxmathsym on export

This commit is contained in:
Enrico Forestieri 2016-09-16 00:32:35 +02:00
parent 9f1b80a2af
commit 1b7dea5c2f

View File

@ -387,7 +387,7 @@ bool ensureMath(WriteStream & os, bool needs_mathmode, bool macro,
brace = true;
}
os.textMode(true);
} else if (macro && brace && !textmode_macro) {
} else if (macro && brace && !needs_mathmode && !textmode_macro) {
// This is a user defined macro, not a MathMacro, so we
// cannot be sure what mode is needed. We leave it in the
// same environment it was entered by closing either \lyxmathsym