I want to put some algorithm2e
procedures into a figure like:
\begin{figure}
\begin{procedure}
some code \;
\caption{abc (n).}
\end{procedure}
\begin{procedure}
some code \;
\caption{abc (n).}
\end{procedure}
\caption{some procedures.}
\end{figure}
Please, how to do it?
Best Answer
The
procedure
environment likealgorithm
is already a float so you cannot place it insidefigure
ortable
directly. See this discussion for more details.You can place your procedures in
minipage
environmentand add caption usingand then enclose them incaptionof
command fromcaption
package.figure
environment as follows,You may also want to look at the answers for this question.