tex2lyx: support algorithm2e (#8728)

This commit is contained in:
Juergen Spitzmueller 2014-01-28 12:44:22 +01:00
parent bab58480bc
commit f76a8c8ab1

View File

@ -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 << '}';