Fix spurious \end{CJK} in LaTeX output.

This commit is contained in:
Günter Milde 2019-05-07 23:37:30 +02:00
parent 46119b3564
commit af9838fd32

View File

@ -305,8 +305,10 @@ static TeXEnvironmentData prepareEnvironment(Buffer const & buf,
// in multilingual environments, the CJK tags have to be nested properly // in multilingual environments, the CJK tags have to be nested properly
data.cjk_nested = false; data.cjk_nested = false;
if (data.par_language->encoding()->package() == Encoding::CJK && if (!bparams.useNonTeXFonts && (bparams.inputenc == "auto-legacy"
state->open_encoding_ != CJK && pit->isMultiLingual(bparams)) { || bparams.inputenc == "auto-legacy-plain")
&& data.par_language->encoding()->package() == Encoding::CJK
&& state->open_encoding_ != CJK && pit->isMultiLingual(bparams)) {
if (prev_par_language->encoding()->package() == Encoding::CJK) { if (prev_par_language->encoding()->package() == Encoding::CJK) {
os << "\\begin{CJK}{" os << "\\begin{CJK}{"
<< from_ascii(data.par_language->encoding()->latexName()) << from_ascii(data.par_language->encoding()->latexName())