X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.cpp;h=6447e33eecad05daa7d380b3a59c50229a3bd7cb;hb=8bf5d4b4614bc45e727112cdb20e162da3e26717;hp=b758787e28ddaa0bd55c66e99b5faf6e9bce4a33;hpb=b99a2a625513ebac315d5d70a6ed8d23e330f321;p=features.git diff --git a/src/Encoding.cpp b/src/Encoding.cpp index b758787e28..6447e33eec 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -698,7 +698,9 @@ void Encodings::validate(char_type c, LaTeXFeatures & features, bool for_mathed) (!for_mathed && !it->second.textcommand.empty()); bool const plain_utf8 = (features.runparams().encoding->name() == "utf8-plain"); // with utf8-plain, we only load packages when in mathed (see #7766) - if (math_mode || (use_math && !plain_utf8)) { + // and if we do not use unicode-math + if ((math_mode && !features.isRequired("unicode-math")) + || (use_math && !plain_utf8)) { if (!it->second.mathpreamble.empty()) { if (it->second.mathfeature()) { string feats = it->second.mathpreamble;