1

I use the following algorithm many times throughout my paper:

\begin{algorithm}[!t]
  \caption{Title}
  \begin{algorithmic}[1]

    \Procedure{Graph}{$ \alpha, \beta $}    
    \State ...
    \EndProcedure
  \end{algorithmic}
\end{algorithm}

How can I change procedure to appear pseudocode only for a single algorithm environment without affecting the entire paper?

Thank you

1 Answer 1

1

Change the definition of \algorithmicprocedure in the scope of the desired algorithm environment.

\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}

\begin{document}

\begin{algorithm}[!t]
\caption{Title}

\algrenewcommand\algorithmicprocedure{\textbf{pseudocode}}

\begin{algorithmic}[1]

\Procedure{Graph}{$ \alpha, \beta $}    
  \State ...
\EndProcedure

\end{algorithmic}
\end{algorithm}

\begin{algorithm}[!t]
\caption{Title}

\begin{algorithmic}[1]

\Procedure{Graph}{$ \alpha, \beta $}    
  \State ...
\EndProcedure

\end{algorithmic}
\end{algorithm}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .