mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Load the CJK package if requested
The package was not loaded if a the main language was not CJK, the main encoding was non-default and the document had a secondary CJK language.
This commit is contained in:
parent
7033b15793
commit
b3a8abffc7
@ -2847,6 +2847,15 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
|
||||
os << "\\usepackage{CJK}\n";
|
||||
break;
|
||||
}
|
||||
// Load the CJK package if needed by a secondary language.
|
||||
// If the main encoding is some variant of UTF8, use CJKutf8.
|
||||
if (encoding().package() != Encoding::CJK && features.mustProvide("CJK")) {
|
||||
if (encoding().iconvName() == "UTF-8"
|
||||
&& LaTeXFeatures::isAvailable("CJKutf8"))
|
||||
os << "\\usepackage{CJKutf8}\n";
|
||||
else
|
||||
os << "\\usepackage{CJK}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user