commit f76a8c8ab1a7273781e4fa7a361e9fe5464d6257
Author: Juergen Spitzmueller <[email protected]>
Date:   Tue Jan 28 12:44:22 2014 +0100

    tex2lyx: support algorithm2e (#8728)

diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index c4d41c8..0676cad 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -960,6 +960,18 @@ void Preamble::handle_package(Parser &p, string const & 
name,
        else if (name == "hyperref")
                handle_hyperref(options);
 
+       else if (name == "algorithm2e") {
+               // Load "algorithm2e" module
+               addModule("algorithm2e");
+               // Add the package options to the global document options
+               if (!options.empty()) {
+                       if (h_options.empty())
+                               h_options = join(options, ",");
+                       else
+                               h_options += ',' + join(options, ",");
+               }
+       }
+
        else if (!in_lyx_preamble) {
                if (options.empty())
                        h_preamble << "\\usepackage{" << name << '}';

Reply via email to