From 1b7dea5c2fa83efc80f056aafc8f5d8b4551daa1 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 16 Sep 2016 00:32:35 +0200 Subject: [PATCH] Do not prematurely close \ensuremath or \lyxmathsym on export --- src/mathed/MathFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2