[Tex/LaTex] How to avoid uppercase function name while using Function

algorithmscapitalization

In LaTeX, I want to define a function in my algorithm, following is my code in case:

\begin{algorithm}[h]
   \begin{algorithmic}[1]
       \Function{BuildPolicySet}{PolicySet PS, CCR ccr}
            blabla..
       \EndFunction
   \end{algorithmc}
\end{algorithm}[h] 

In the pdf I got

function BUILDPOLICYSET(PolicySet PS, CCR ccr)

Actually I don't need the function name being in uppercase.

What should I do if I want the function name in the pdf to be the same as in the LaTeX code?

Best Answer

The function name is set using a predefined \textproc, which is similar to \textsc, changing the shape to small-caps. Redefine this to be empty and things will turn back to normal:

enter image description here

\documentclass{article}
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\algrenewcommand\textproc{}% Used to be \textsc

\begin{document}
\begin{algorithmic}[1]
  \show\Function
  \Function{BuildPolicySet}{PolicySet PS, CCR ccr}
    \State blabla..
  \EndFunction
\end{algorithmic}
\end{document}