]> git.lyx.org Git - features.git/commitdiff
* LaTeXFeatures.cpp (useLanguage):
authorJürgen Spitzmüller <spitz@lyx.org>
Sat, 17 Nov 2007 12:37:18 +0000 (12:37 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sat, 17 Nov 2007 12:37:18 +0000 (12:37 +0000)
- require the CJK package for CJK languages.
* BufferParams.cpp (writeEncodingPreamble):
- load CJK package if required.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21652 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp
src/LaTeXFeatures.cpp

index c4d3158d14513624e38a8b02f53bbd5084c3dc70..a713f84c52a74bfec1853b65c883c76c8500f224 100644 (file)
@@ -1620,7 +1620,7 @@ void BufferParams::writeEncodingPreamble(odocstream & os,
                        os << "]{inputenc}\n";
                        texrow.newline();
                }
-               if (package == Encoding::CJK) {
+               if (package == Encoding::CJK || features.mustProvide("CJK")) {
                        os << "\\usepackage{CJK}\n";
                        texrow.newline();
                }
index 69ecf92cbede64609025b2e80c4532dae17827bf..b5b71ff77cec66c338060f8c66d3401411d07530 100644 (file)
@@ -354,6 +354,10 @@ void LaTeXFeatures::useLanguage(Language const * lang)
 {
        if (!lang->babel().empty())
                UsedLanguages_.insert(lang);
+       // CJK languages do not have a babel name.
+       // They use the CJK package
+       if (lang->encoding()->package() == Encoding::CJK)
+               require("CJK");
 }