I am using algorithmicx
package in LaTeX to write an algorithm and a procedure in my LaTeX file. I want LaTeX to number the procedures differently, but the numbering is the same as algorithms. Is there any way to have an independent numbering for the procedures?
\documentclass[12pt]{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}[h]
\caption{Set $S$} \label{alg001}
\begin{algorithmic}[1]
\State $S \gets \emptyset$;
\end{algorithmic}
\end{algorithm}
\floatname{algorithm}{Procedure}
\begin{algorithm}[h]
\begin{algorithmic}[1]
\Procedure{Proc}{$A,B$}
\State $T \gets \emptyset$;
\EndProcedure
\end{algorithmic}
\caption{The Procedure}
\end{algorithm}
\end{document}
Best Answer
It may be done better, but the idea should be clear. We define the second algorithm-like float.