]> git.lyx.org Git - features.git/commitdiff
do not output empty language switch commands (bug #8216)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 24 Jun 2012 08:56:08 +0000 (10:56 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 24 Jun 2012 08:56:08 +0000 (10:56 +0200)
src/output_latex.cpp

index c5f8306201798a5f82806f737c9e0e30c3928e87..92913afb4e92c1cf8f11f34c5d43284bccb0b6f8 100644 (file)
@@ -581,7 +581,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",
@@ -642,7 +643,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",