]> git.lyx.org Git - features.git/commitdiff
Fix unbalanced bracket problem with CJK
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 Oct 2013 10:19:41 +0000 (12:19 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 Oct 2013 10:35:22 +0000 (12:35 +0200)
The bug was introduced with commit [2af09e2e/lyxgit], where the unnecessary trailing bracket in CJK environments was suppresed, but not the preceding bracket (which is only output if CJK is a secondary language).

src/Font.cpp
status.20x

index 3602e3102011a7efd591d05cbcd0fdb2f06764b9..8a3d3af404adabed759a29adf18775f317b936f0 100644 (file)
@@ -284,7 +284,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                        tmp += "{";
                        os << from_ascii(tmp);
                        count += tmp.length();
-               } else {
+               } else if (language()->encoding()->package() != Encoding::CJK) {
                        os << '{';
                        count += 1;
                }
@@ -319,7 +319,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                                      "$$lang", language()->babel());
                        os << from_ascii(tmp);
                        count += tmp.length();
-               } else {
+               } else if (language()->encoding()->package() != Encoding::CJK) {
                        os << '{';
                        count += 1;
                }
index f75788a883fefbc8174efd3de91af696c74a2754..6a36c68f98c74fd05ee607cc1ac8b3017309dc78 100644 (file)
@@ -59,6 +59,9 @@ What's new
 
 - Fix problem with unbalanced braces in XeTeX output (bug 8765).
 
+- Fix problems with unbalanced braces with a secondary CJK language
+  (bug 8215).
+
 - Fix state of certain language packages (polyglossia, japanese) in
   child documents (bug 8770).