I want to describe algorithms that have two parts: an interface specification and an algorithm.
The interface specifications should be labeled Module and the algorithm specifications should be labeled Algorithm. Moreover, I want the interfaces to be numbered separately from the algorithms.
The output should be something like the following:
Module 1: An interface specification
Some interface spec...
Algorithm 1: An algorithm
Some pseudocode...
The following, however, is what I'm currently getting:
My code is the following:
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\makeatletter
\renewcommand{\ALG@name}{Module: }
\makeatother
\begin{document}
\begin{algorithm}
\caption{An interface specification}
\begin{algorithmic}
\State Some interface spec...
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{An algorithm}
\begin{algorithmic}
\State Some pseudocode...
\end{algorithmic}
\end{algorithm}
\end{document}
algorithm2e
,algorithmicx
,algorithms
, or just a plaintabbing
environment. Please try out any of these first and then come back with a specific question. I'm voting to close as unclear for now, but once you add a minimal example illustrating your specific problem we can reopen it.pseudocode
collecting all packages for typesetting algorithms.