From: Enrico Forestieri Date: Thu, 15 Sep 2016 22:32:35 +0000 (+0200) Subject: Do not prematurely close \ensuremath or \lyxmathsym on export X-Git-Tag: 2.3.0alpha1~1018 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1b7dea5c2fa83efc80f056aafc8f5d8b4551daa1;p=features.git Do not prematurely close \ensuremath or \lyxmathsym on export --- diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp index 0814167612..478d22adb0 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -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