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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.