Dear all, this is a bug collection for algorithm2e (+ docs).
1. http://bugs.debian.org/670161 Since the last upgrade of texlive-science (to TL 2011), the dotocloa option of the algorithm2e package doesn't work any more. Minimal example: \documentclass{article} % This fails: \usepackage[dotocloa]{algorithm2e} % But this would work: %\usepackage{algorithm2e} \begin{document} \end{document} ! Undefined control sequence. l.1005 \newcommand{\algocf@name }{algorithm2e}% 2. http://bugs.debian.org/670163 The latest version of the algorithm2e package's documentation mentions the keyword \KwFrom (page 10, section 6, in the onelanguage option description), but it doesn't seem to be implemented. When used, compilation fails with the following error: ! Undefined control sequence. <argument> i \KwFrom 0 \KwTo 42 l.13 } The \KwFrom keyword would actually be very useful to declare \For loops (please see the attached example file), so I suggest implementing it and documenting it in the section 9 of the documentation (“The predefined language keywords”). Minimal example: \documentclass{article} \usepackage{algorithm2e} % This is needed: %\SetKw{KwFrom}{from} \begin{document} \section{This is a test} \begin{algorithm}[htbp] \For {i \KwFrom 0 \KwTo 42} { do something \; } \caption{Test algorithm} \end{algorithm} \end{document} 3. http://bugs.debian.org/670165 The documentation of the algorithm2e package contains a typo, see page 23, section 10.2: “\SetKwData{Kw}{thetext} defines the macro \Kw{w}hich defines […]” (instead of “the macro \Kw which defines”). Patch is attached. Please be so kind to have a look at that and send me your comments. Please keep the bugs in Cc. Regards, Hilmar -- http://www.hilmar-preusse.de.vu/
--- algorithm2e.tex 2012-04-23 17:30:19.364076424 +0200 +++ algorithm2e-new.tex 2012-04-23 17:35:34.553635157 +0200 @@ -1209,7 +1209,7 @@ defines a keyword \emph{thetext} and prints it in keyword typography. It can take one argument: $backslash$Kw\{arg\}. If so, \emph{arg} is printed in argument typography. -\item[\Almacpp{SetKwData}{Kw}{thetext}] defines the macro \almacp{Kw} +\item[\Almacpp{SetKwData}{Kw}{thetext}] defines the macro \almac{Kw} which defines a data text. Prints \emph{thetext} in data typography. Note that this macros can takes one argument as function macros. \item[\Almacpp{SetKwHangingKw}{name}{text}] (hanging indent with keyword): This creates a hanging indent much like