Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.