I want to create two separate algorithm counters in Latex. The first one is for my main algorithms, the second one for subroutines.
In particular, I now have the following algorithms (in order):
Algorithm 1
Algorithm 2
Algorithm 3
This I want to change into (in order):
Algorithm 1
Subroutine 1 (so different name and different counter)
Algorithm 2
How can this be done?
I use:
\documentclass{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\begin{document}
\begin{algorithm}[H]
\caption{NameForAlgo1}
\label{}
\begin{algorithmic}[1]
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[H]
\caption{NameForSubRoutine1}
\label{}
\begin{algorithmic}[1]
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[H]
\caption{NameForAlgo2}
\label{}
\begin{algorithmic}[1]
\end{algorithmic}
\end{algorithm}
\end{document}
algorithmicx
(which providesalgorithmic
) oralgorithms
'salgorithmic
? Please, before you answer in comment, consider adding a minimal working example (MWE) to your post via an edit. Click on the MWE link and read the post...