The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit e4b5af90b97162472cad1d9b9e8a9772c20805f8
Author: Juergen Spitzmueller <[email protected]>
Date:   Thu Jun 28 16:52:13 2012 +0200

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

diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 103a8bc..e6deb61 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -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",

-----------------------------------------------------------------------

Summary of changes:
 src/output_latex.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to