Tag Info

New answers tagged

0

As to creating a new type, use \newfloat (or just \newcounter). \documentclass{article} \usepackage{float} \usepackage{caption} \newfloat{Algorithm}{htbp}{loa} \begin{document} \captionof{Algorithm}{test} \end{document}


2

The type is different from what is typically used in the naming. In that regard, the algorithm environment typically use Algorithm as its name. algorithm2e is slightly different though; it uses algocf as the type, so you need to use \captionof{algocf}{<caption of algorithm>} Make sure the \captionof macro is used inside an environment (or group). ...


2

Styling of document elements should preferably be done in a consistent manner. As such and rightly so, algorithm2e's \SetAlFnt is issued at the start of the algorithm environment. That's why, when you call \SetAlFnt halfway through the algorithm... or even immediately after \begin{algorithm}, it's too late to change the algorithm fonts. ...


1

Below I've used two minipages, one for each algorithm, followed by two more minipages, one for each algorithm caption. The double-usage is required to achieve the appropriate alignment. \documentclass{article} \usepackage{amsmath} \usepackage[noline]{algorithm2e} \begin{document} \begin{figure} \begin{minipage}{0.65\linewidth} \begin{algorithm}[H] ...


3

You can use \SetAlgorithmName{Listing} inside the algorithm environment. \documentclass{article} \usepackage{algorithm2e} \begin{document} \begin{algorithm} test \caption{algo 1} \end{algorithm} \begin{algorithm} \SetAlgorithmName{Listing} test \caption{algo 2} \end{algorithm} ...


2

The message is due to these lines in algorithm2e.sty: 1214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Main Part %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1215 % 1216 \newcommand{\algocf@name}{algorithm2e}% 1217 \newcommand{\algocf@date}{january 06 2013}% 1218 \newcommand{\algocf@version}{Release 5.0}% 1219 \newcommand{\algocf@id}{\algocf@version\space -- \algocf@date\space --}% ...



Top 50 recent answers are included