Prefer mathmode commands over textmode ones

Translating → to \rightarrow in a \ce inset produces the right
glyph. Instead, translating it to \textrightarrow produces a
different glyph (β).
This commit is contained in:
Enrico Forestieri 2019-05-26 13:06:44 +02:00
parent c8f056417f
commit b3db2325ed

View 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) {