X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.cpp;h=dab24b72ddecf3c2c6eb0a8ba170cab1cf905e92;hb=3923c3abf4206c170876f509a08899b3b7c6c1f5;hp=a4c706bd3b409b30a68e46ef4b3ca3f96fe2630e;hpb=39c0b322f7b140ca9a9c1544adf05f296a5ea28f;p=lyx.git diff --git a/src/Encoding.cpp b/src/Encoding.cpp index a4c706bd3b..dab24b72dd 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -390,6 +390,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype, docstring value; value += unicodeSymbol.first; needsTermination = !unicodeSymbol.second.mathNoTermination(); + if (req && unicodeSymbol.second.mathFeature() + && !unicodeSymbol.second.mathPreamble().empty()) + req->insert(unicodeSymbol.second.mathPreamble()); return value; } } @@ -400,6 +403,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype, docstring value; value += unicodeSymbol.first; needsTermination = !unicodeSymbol.second.textNoTermination(); + if (req && unicodeSymbol.second.textFeature() + && !unicodeSymbol.second.textPreamble().empty()) + req->insert(unicodeSymbol.second.textPreamble()); return value; } } @@ -453,13 +459,13 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype, // the prefix of some command in the unicodesymbols file docstring subcmd = cmd.substr(i, j - i + 1); - CharInfoMap::const_iterator it = unicodesymbols.begin(); // First part of subcmd which might be a combining character docstring combcmd = (m == j) ? docstring() : cmd.substr(i, m - i + 1); // The combining character of combcmd if it exists - CharInfoMap::const_iterator combining = uniend; size_t unicmd_size = 0; char_type c = 0; + CharInfoMap::const_iterator it = unicodesymbols.begin(); + CharInfoMap::const_iterator combining = uniend; for (; it != uniend; ++it) { if (it->second.deprecated()) continue;