2
\documentclass{article}
\usepackage{algorithm,algpseudocode}
\algtext*{EndIf}% Remove \EndIf
\renewcommand{\thealgorithm}{}
\usepackage{amsmath,amssymb}
\begin{document}
\LinesNumberedHidden{
\begin{algorithm}
\caption{$Game PrvInd_{G,\phi}$}
\label{pseudoPSO}
\begin{algorithmic}[1]
\Procedure{Garble}{f_0, f_1, x)0, x1} 

    \If{$f(\phi(f0) \neq\phi(f1)$} 
    \Return $\perp$ \EndIf
    \If {$ev(f_0, x_0) \neq ev(f_1, x_1)$}
    \Return $\perp$ \EndIf
    \If{$\{x_0,x_1\} \nsubseteq \{0,1\}^{{f_0}.n}$} \Return $\perp$ \EndIf
    $(F, e, d) \leftarrow Gb(1^k, f_b)$; 
    $X \leftarrow En(e, x_b)$
    \Return (F,X, d) 
\EndProcedure

\end{algorithmic}
\end{algorithm}}
\end{document}

How to hide line numbering in latex algorithm?

9

Maybe you could remove the "[1]" in the line "\begin{algorithmic}[1]"?

  • \LinesNumberedHidden seems to be a made up command – clemens Apr 24 '17 at 18:00
  • 4
    What's the downvote for? The suggestion actually works! – clemens Apr 24 '17 at 18:00
  • Thanks for editing! I totally forgot that there is such a thing as code blocks... – ml4294 Apr 24 '17 at 18:23
  • Simplest answer and worked well :) – Avijit Dasgupta Apr 3 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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