[Tex/LaTex] Change font for function names within algorithmic

algorithmicfonts

Using the following code, the function name foo is printed as \textsc{foo}.

\usepackage{algorithmic}
\begin{document}
\begin{frame}
\begin{algorithmic}[1]
    \Function{foo}{$a$}
    \EndFunction
\end{algorithmic}
\end{frame}

How can I change this to \texttt{foo} for all \Function and \Call commands?

Best Answer

The needed package is algpseudocode, not algorithmic.

\documentclass{article}
\usepackage{algpseudocode}
\algrenewcommand\textproc{\texttt}
\begin{document}
\begin{algorithmic}[1]
    \Function{foo}{$a$}
    \EndFunction
\end{algorithmic}
\end{document}

enter image description here