[Tex/LaTex] How to write a procedure in Latex

algorithms

I want to write a procedure in latex. I know the algorithmic package. But I want my function should not come with a name Algorithm 1 Func_name.

I want this.

Func_name(parameter)
{
   statement 1;
   statement 2;
}

Please help.

Best Answer

You can use algpseudocode.sty from algorithmicx package.

\documentclass{article}

\usepackage{algorithm}
\usepackage{algpseudocode}

\begin{document}

\begin{algorithm}
  \begin{algorithmic}[1]
    \Function{Func\_name}{parameter}
      \State statement 1
      \State statement 2    
    \EndFunction
  \end{algorithmic}
\end{algorithm}

\end{document}