From f76a8c8ab1a7273781e4fa7a361e9fe5464d6257 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 28 Jan 2014 12:44:22 +0100 Subject: [PATCH] tex2lyx: support algorithm2e (#8728) --- src/tex2lyx/Preamble.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index c4d41c88ed..0676cad19b 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 << '}'; -- 2.39.2