From 689e0ba8e1fc9b041033a852995cf4f989f18fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 17 Nov 2007 12:35:50 +0000 Subject: [PATCH] * LaTeXFeatures.cpp (useLanguage): - 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/branches/BRANCH_1_5_X@21651 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferParams.cpp | 2 +- src/LaTeXFeatures.cpp | 4 ++++ status.15x | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index fc082c178b..f0e542e7c7 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1406,7 +1406,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(); } diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index b5637cebcc..a23b182a0a 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -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"); } diff --git a/status.15x b/status.15x index 451f33ee8b..11ab60ac2d 100644 --- a/status.15x +++ b/status.15x @@ -120,6 +120,8 @@ What's new - Fix updating of externally modified files on Windows both in the workarea and in the output (bug 3172). +- Fix loading of the CJK package in multilingual documents (part of bug 4337). + - Fix a problem on Windows where invalid names were given to backup files (bug 4287).