do not output empty language switch commands (bug #8216, the actual fix)

This commit is contained in:
Juergen Spitzmueller 2012-06-28 16:52:13 +02:00
parent 065f247ccb
commit e4b5af90b9

View File

@ -583,7 +583,8 @@ void TeXOnePar(Buffer const & buf,
os << "\\L{";
}
// With CJK, the CJK tag has to be closed first (see below)
if (runparams.encoding->package() != Encoding::CJK) {
if (runparams.encoding->package() != Encoding::CJK
&& !par_lang.empty()) {
os << from_ascii(subst(
lang_begin_command,
"$$lang",
@ -644,7 +645,8 @@ void TeXOnePar(Buffer const & buf,
os << "%\n";
}
// With CJK, the CJK tag had to be closed first (see above)
if (runparams.encoding->package() == Encoding::CJK) {
if (runparams.encoding->package() == Encoding::CJK
&& !par_lang.empty()) {
os << from_ascii(subst(
lang_begin_command,
"$$lang",