[Tex/LaTex] Pseudocode with the procedure in caption

algorithmicxalgorithmscaptions

I am trying to have pseudocode similar to that in this article. I am currently using the algorithmicx package. My problem is that I would like to have the caption look like below:

enter image description here

So in caps and complete with arguments. I can't seem to figure out how to do this. Below is an example. Basically I would want the "Euclid(a,b)" to be in the caption, instead of the body after procedure.

\documentclass[11pt]{article} 

\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

\floatname{algorithm}{Procedure}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\renewcommand\thealgorithm{}

\begin{document}

\begin{algorithm}
\caption{Euclid’s algorithm}
\begin{algorithmic}[1]
\Require Integers $a$ and $b$
\Ensure The g.c.d of $a$ and $b$
\Procedure{Euclid}{$a,b$}
\State $r\gets a\bmod b$
\While{$r\not=0$}
\State $a\gets b$
\State $b\gets r$
\State $r\gets a\bmod b$
\EndWhile
\State \textbf{return} $b$
\EndProcedure
\end{algorithmic}
\end{algorithm}

\end{document}

Best Answer

The trick is to use \textproc, as below:

\documentclass[11pt]{article} 

\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

\floatname{algorithm}{Procedure}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\renewcommand\thealgorithm{}

\begin{document}

\begin{algorithm}
\caption{\textproc{Euclid}$(a,b)$}
\begin{algorithmic}[1]
\Require Integers $a$ and $b$
\Ensure The g.c.d of $a$ and $b$
\State $r\gets a\bmod b$
\While{$r\not=0$}
\State $a\gets b$
\State $b\gets r$
\State $r\gets a\bmod b$
\EndWhile
\State \textbf{return} $b$
\end{algorithmic}
\end{algorithm}

\end{document}

This results in enter image description here

Incidentally, this is also useful when you wish to refer to an algorithm in the text.