]> git.lyx.org Git - features.git/commitdiff
Allow usage of algorithm2e package (#8744)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 26 Jan 2014 18:23:40 +0000 (19:23 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 26 Jan 2014 18:23:40 +0000 (19:23 +0100)
This simple module allows users to use the algorithm2e package at all. Before, it was not possible with LyX, since this package conflicts with LyX's own algorithm support (see also #8728)

lib/Makefile.am
lib/chkconfig.ltx
lib/doc/LaTeXConfig.lyx
lib/layouts/algorithm2e.module [new file with mode: 0644]
src/LaTeXFeatures.cpp

index f1b2d9cc14afc20c84c000515ae513aa328e4b65..debe5102627187f0ff87ce828eec2b961ee0b880 100644 (file)
@@ -1890,6 +1890,7 @@ dist_layouts_DATA =\
        layouts/agu_stdtitle.inc \
        layouts/agums.layout \
        layouts/aguplus.inc \
+       layouts/algorithm2e.module \
        layouts/amsart.layout \
        layouts/amsbook.layout \
        layouts/amsdefs.inc \
index bd593e5da47822f9a4ca675797f4a9b2f507820b..e22c7d937176d90f240834f2c36f156eda282b75 100644 (file)
 \TestPackage{accents}
 \TestPackage{achicago}
 \TestPackage{algorithm}
+\TestPackage{algorithm2e}
 \TestPackage{amstext}
 \TestPackage{apacite}
 \TestPackage{apalike}
index a856894e5d205691f52aaa9d7537ec28e471a51a..f1df9ce3eaffd0f308dcdc59571127a40b7f55db 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 462
+\lyxformat 474
 \begin_document
 \begin_header
 \textclass article
@@ -31,6 +31,7 @@
 \use_geometry false
 \use_package amsmath 0
 \use_package amssymb 0
+\use_package cancel 0
 \use_package esint 0
 \use_package mathdots 0
 \use_package mathtools 0
@@ -39,7 +40,7 @@
 \use_package stmaryrd 0
 \use_package undertilde 0
 \cite_engine basic
-\cite_engine_type numerical
+\cite_engine_type default
 \biblio_style plain
 \use_bibtopic false
 \use_indices false
@@ -59,7 +60,7 @@
 \papercolumns 1
 \papersides 1
 \paperpagestyle plain
-\tracking_changes false
+\tracking_changes true
 \output_changes false
 \html_math_output 0
 \html_css_as_file 0
@@ -67,6 +68,7 @@
 \html_latex_start <span class='latex'>
 \html_latex_end </span>
 \author -1379302345 "Julien Rioux" jrioux@lyx.org
+\author -712698321 "Jürgen Spitzmüller" 
 \end_header
 
 \begin_body
@@ -6193,6 +6195,74 @@ index of algorithms
 \end_inset
 
  too.
+\change_inserted -712698321 1390760230
+
+\end_layout
+
+\begin_layout Subsection
+
+\change_inserted -712698321 1390760234
+algorithm2e
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1390760231
+Found: 
+\begin_inset Info
+type  "package"
+arg   "algorithm2e"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1390760405
+CTAN: 
+\family typewriter
+/macros/latex/contrib/algorithm2e/
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1390760383
+Notes: The package 
+\family sans
+algorithm2e
+\family default
+ is an alternative, somewhat more powerful way to output 
+\begin_inset Quotes eld
+\end_inset
+
+algorithm
+\begin_inset Quotes erd
+\end_inset
+
+ floats.
+ If you want to use it instead of the standard 
+\family sans
+algorithm
+\family default
+ package, select the module 
+\begin_inset Quotes eld
+\end_inset
+
+Algorithm2e
+\begin_inset Quotes erd
+\end_inset
+
+ in 
+\family sans
+Document\SpecialChar \menuseparator
+Settings\SpecialChar \ldots{}
+\SpecialChar \menuseparator
+Modules
+\family default
+.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Subsection
diff --git a/lib/layouts/algorithm2e.module b/lib/layouts/algorithm2e.module
new file mode 100644 (file)
index 0000000..ededd8d
--- /dev/null
@@ -0,0 +1,26 @@
+#\DeclareLyXModule[algorithm2e.sty]{Algorithm2e}
+#DescriptionBegin
+# Use the algorithm2e package for algorithm floats rather
+# then LyX's home-brewn algorithm floats.
+#DescriptionEnd
+#
+#Author: Jürgen Spitzmüller
+
+Format 35
+
+Requires algorithm2e
+
+Float
+       Type                  algorithm
+       GuiName               Algorithm
+       Placement             tbp
+       Extension             loa
+       NumberWithin          none
+       Style                 plain
+       ListName              "List of Algorithms"
+       IsPredefined          true
+       UsesFloatPkg          false
+       ListCommand           listofalgorithms
+       RefPrefix             alg
+End
+
index 458d07ff61c6eec954f6419a69ca0d79555ada18..c68729f5aaf47768595126991941f1b3b511b176 100644 (file)
@@ -740,7 +740,8 @@ char const * simplefeatures[] = {
        "multirow",
        "tfrupee",
        "shapepar",
-       "rsphrase"
+       "rsphrase",
+       "algorithm2e"
 };
 
 char const * bibliofeatures[] = {