]> git.lyx.org Git - features.git/commitdiff
Do not prematurely close \ensuremath or \lyxmathsym on export
authorEnrico Forestieri <forenr@lyx.org>
Thu, 15 Sep 2016 22:32:35 +0000 (00:32 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 15 Sep 2016 22:32:35 +0000 (00:32 +0200)
src/mathed/MathFactory.cpp

index 0814167612e3c110fdd76cd1ec84e4ba42fa9bef..478d22adb013371b888d57ad90e4bdb14b0106af 100644 (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