commit 1b7dea5c2fa83efc80f056aafc8f5d8b4551daa1
Author: Enrico Forestieri <[email protected]>
Date:   Fri Sep 16 00:32:35 2016 +0200

    Do not prematurely close \ensuremath or \lyxmathsym on export
---
 src/mathed/MathFactory.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp
index 0814167..478d22a 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

Reply via email to