]> git.lyx.org Git - features.git/commitdiff
Make CJK.lyx exportable.
authorGeorg Baum <baum@lyx.org>
Sun, 8 Jul 2012 20:35:22 +0000 (22:35 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 8 Jul 2012 20:35:22 +0000 (22:35 +0200)
If there was an encoding set by the inputenc package, it must not be ignored.
Now all tex2lyx test cases can be exported to .tex again by LyX (although
there are still some differences in the .lyx output).

src/tex2lyx/Preamble.cpp

index 92e3da70211ca9321a7916870a00ccd222a4ae51..afa099790419dae3770807ed444ecd35f51cc200 100644 (file)
@@ -759,7 +759,8 @@ void Preamble::handle_package(Parser &p, string const & name,
                have_CJK = true;
                // set the encoding to "auto" because it might be set to "default" by the babel handling
                // and this would not be correct for CJK
-               h_inputencoding = "auto";
+               if (h_inputencoding == "default")
+                       h_inputencoding = "auto";
                registerAutomaticallyLoadedPackage("CJK");
        }