]> git.lyx.org Git - features.git/commitdiff
do not output empty language switch commands (bug #8216, the actual fix)
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 28 Jun 2012 14:52:13 +0000 (16:52 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 28 Jun 2012 14:52:13 +0000 (16:52 +0200)
src/output_latex.cpp

index 103a8bc42a11b88b05907a1053f9a458ad41bea5..e6deb6179a12df84e084c062e3addf917d7c7f96 100644 (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",