I am using algpseudocode
for writing an algorithm, and I would like to remove the "Algorithm X" from the title when adding a caption. How can I do this?
Example:
\documentclass{article}
\usepackage{algorithmicx, algpseudocode, algorithm}
\begin{document}
\begin{algorithm}
\textbf{Input:} Placeholder input \\
\textbf{Output:} Placeholder output
\begin{algorithmic}[1]
\Function{foo}{x} \\
\Return $x+1$
\EndFunction
\end{algorithmic}
\caption{Placeholder caption}
\label{placeholder}
\end{algorithm}
\end{document}
How can I remove "Algorithm 1" from the title, and replace it with my own text, say "My text 1", where the counter also increases? I would still like to have a caption at the top, I just want to replace "Algorithm 1" with something else. I tried using figure
instead of algorithm
, but I would like to have the other formatting (horizontal lines) that the algorithm
environment provides.
I have seen this, but that refers to algorithmic
, not algorithmicx
. Additionally, I would prefer a solution that can be applied to a specific algorithm instead of the whole document, since I have other algorithms where I want to keep the title intact.
Thank you.