]> git.lyx.org Git - features.git/commitdiff
Revert "tex2lyx/Preamble.cpp: fix bug #8525 temporarily"
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 11 Feb 2013 10:56:27 +0000 (11:56 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 11 Feb 2013 10:56:27 +0000 (11:56 +0100)
This reverts commit a69fcde0726450d696081ed5c21506d42a90b103.
The commit causing #8525 is [2f7f0c76/lyxgit]

src/tex2lyx/Preamble.cpp

index 7d71f333f051417c94563b40548bd152d627eb17..d4c0b036bf7da3de518940179d79685145cc32c1 100644 (file)
@@ -853,20 +853,11 @@ void Preamble::handle_package(Parser &p, string const & name,
                // Therefore check for the "," character.
                // It is also only set when there is not more than one babel
                // language option.
-               if (!opts.empty()) {
-                       if (opts.find(",") == string::npos && one_language == true) {
-                               h_inputencoding = opts;
-                               // FIXME: if this line is used, tex2lyx swallows the next character
-                               // in the file behind "{inputenc}"
-                               //p.setEncoding(opts);
-                       } else {
-                               h_preamble << "\\usepackage[" << opts << "}{" << name << "}\n";
-                               // FIXME: enabling this introduces bug #8525
-                               //p.setEncoding(options.back(), Encoding::inputenc);
-                       }
-                       options.clear();
-               } else
-                       h_preamble << "\\usepackage{" << name << "}\n";         
+               if (opts.find(",") == string::npos && one_language == true)
+                       h_inputencoding = opts;
+               if (!options.empty())
+                       p.setEncoding(options.back(), Encoding::inputenc);
+               options.clear();
        }
 
        else if (name == "srcltx") {