]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
More general fix for part of 5403.
[lyx.git] / src / Encoding.cpp
index 41f96420cb36d90d4773ad4d04b512c7f6d4430e..34cee34bae69beb56e95e4543d17ac1504232115 100644 (file)
@@ -410,7 +410,8 @@ bool Encodings::latexMathChar(char_type c, bool mathmode,
                if (!encoding || command.empty()) {
                        command = it->second.textcommand;
                        addTextCmd(c);
-               } else if (mathmode)
+               }
+               if (mathmode)
                        addMathSym(c);
        }
        return use_math;
@@ -421,7 +422,7 @@ char_type Encodings::fromLaTeXCommand(docstring const & cmd, bool & combining)
 {
        CharInfoMap::const_iterator const end = unicodesymbols.end();
        CharInfoMap::const_iterator it = unicodesymbols.begin();
-       for (; it != end; ++it) {
+       for (combining = false; it != end; ++it) {
                docstring const math = it->second.mathcommand;
                docstring const text = it->second.textcommand;
                if (math == cmd || text == cmd) {
@@ -559,10 +560,6 @@ void Encodings::validate(char_type c, LaTeXFeatures & features, bool for_mathed)
                                } else
                                        features.addPreambleSnippet(it->second.textpreamble);
                        }
-                       if (for_mathed) {
-                               features.require("relsize");
-                               features.require("lyxmathsym");
-                       }
                }
        }
        if (for_mathed && isMathSym(c)) {