]> git.lyx.org Git - lyx.git/commitdiff
Prefer mathmode commands over textmode ones
authorEnrico Forestieri <forenr@lyx.org>
Sun, 26 May 2019 11:06:44 +0000 (13:06 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 26 May 2019 11:06:44 +0000 (13:06 +0200)
Translating → to \rightarrow in a \ce inset produces the right
glyph. Instead, translating it to \textrightarrow produces a
different glyph (β).

src/mathed/MathExtern.cpp

index 292556513da3b01698ba7517af931486162c4c2a..504fab717bee958d43df5b7802ee5277e86ef03c 100644 (file)
@@ -1431,7 +1431,7 @@ void writeString(docstring const & s, WriteStream & os)
                docstring cmd;
                for (char_type c : s) {
                        try {
-                               Encodings::latexMathChar(c, false, os.encoding(), cmd, space);
+                               Encodings::latexMathChar(c, true, os.encoding(), cmd, space);
                                os << cmd;
                                os.pendingSpace(space);
                        } catch (EncodingException const & e) {