2

The minimal (not) working example is

\documentclass{article}
\usepackage[algo2e,ruled,vlined]{algorithm2e}
\begin{document}
 \begin{algorithm2e}[h]
  \SetKwProg{myproc}{Procedure}{}{}    
  \myproc{foo()}{
   $\ldots$
  }   
 \end{algorithm2e} 
\end{document}

This example works on Windows with latest version of portable Miktex. However, it doesn't work on Linux (I try Ubuntu and Debian) with texlive installed. Both Linux system is updated. The error I got on Linux is

! Undefined control sequence.
l.6   \SetKwProg
            {myproc}{Procedure}{}{}

Note, that with texlive I successfully Latex many algorithms, the only command which is not working is \SetKwProg. Any suggestion how to resolve this problem?

lockstep
  • 250,273
Dejan
  • 269

1 Answers1

3

Simply you have an older version of the algorithm2e package. The command \SetKwProg is supported only by the latest version 5.0.

TeX Live on Debian and Ubuntu is known to be not updated.

The thread How to install “vanilla” TeXLive on Debian or Ubuntu? might help you on what to do to get an updated version.

karlkoeller
  • 124,410
  • Thank you for the answer. But what should I do to resolve this? There is no update for texlive on my system and algorithm2e is part of texlive-science package, which is up to date. Is there some equivalent command which works on previous versions? – Dejan Jun 22 '13 at 14:15
  • @Petar: besides Werner's comment up, you have to consider that if you installed TeX Liva via apt-get, you probably do not have a recent distribution as karlkoeller pointed. The link he provided might help you in installing an updated TeX Live, which is TeX Live 2013 out from few days. – Claudio Fiandrino Jun 22 '13 at 14:31