]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.cpp
We only support gcc >= 4.9.
[lyx.git] / src / mathed / MathStream.cpp
index 6f4da39bf71b097f80089e87e565317462cce925..e14e850e1805fa7f8a85471f18ba283e7128871b 100644 (file)
@@ -111,6 +111,10 @@ TeXMathStream & operator<<(TeXMathStream & ws, docstring const & s)
                else if (s[first] == ' ' && ws.textMode())
                        ws.os() << '\\';
                ws.pendingSpace(false);
+       } else if (ws.useBraces()) {
+               if (s[first] == '\'')
+                       ws.os() << "{}";
+               ws.useBraces(false);
        }
        ws.os() << s.substr(first);
        int lf = 0;
@@ -241,6 +245,10 @@ TeXMathStream & operator<<(TeXMathStream & ws, char c)
                else if (c == ' ' && ws.textMode())
                        ws.os() << '\\';
                ws.pendingSpace(false);
+       } else if (ws.useBraces()) {
+               if (c == '\'')
+                       ws.os() << "{}";
+               ws.useBraces(false);
        }
        ws.os() << c;
        if (c == '\n')