[Tex/LaTex] Referring to correctly-styled algpseudocode procedure name in document

algorithmicxalgorithmsformatting

Given an algorithm written in algpseudocode:

\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
  \caption{Part 1}
  \begin{algorithmic}[1]
    \Procedure {FooProc}{$G$}
      \State ...
    \EndProcedure
  \end{algorithmic}
\end{algorithm}
\end{document}

How can I now refer to FooProc in my document (outside of the algorithm environment) such that it has the same typeset as in inside the algorithm environment?

Best Answer

That is the document default small caps font so \textsc{FooProc}

Better would be to use the package defined command \textproc{Fooproc} which will do the same thing, but ensure that if you customise the fonts used in the psuedo-code, the reference will use the same font.

Related Question