From: Günter Milde Date: Tue, 5 Feb 2019 19:27:38 +0000 (+0100) Subject: Fix CJK preamble. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8f12d5c82c6b55e4903b98f9e1e4ceef63de358f;p=features.git Fix CJK preamble. Don't load the CJK package with utf8x (feature clash). Load CJK (not CJKutf8) with traditional Chinese and "language-default". --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index aad6ecef0d..011009693b 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1747,9 +1747,9 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features, // load CJK support package before font selection // (see autotests/export/latex/CJK/micro-sign_utf8-cjk-libertine.lyx) - if (!useNonTeXFonts && encoding().package() != Encoding::none + if (!useNonTeXFonts && encoding().package() != Encoding::none && inputenc != "utf8x" && (encoding().package() == Encoding::CJK || features.mustProvide("CJK"))) { - if (encoding().iconvName() == "UTF-8") + if (inputenc == "utf8-cjk" || inputenc == "utf8") os << "\\usepackage{CJKutf8}\n"; else os << "\\usepackage[encapsulated]{CJK}\n";