Now the problem is that that "algorithm2e" and "algpseudocode" seem to be incompatible. Take the following minimal example (note that the document class doesn't matter, I just used article so that I can switch back and forth between "algorithm" and "algorithm2e"; it works just fine with "algorithm"):
Code: Select all
\documentclass{article}
\usepackage{algorithm2e}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{Test algorithm}
\begin{algorithmic}[1]
\Procedure {Test}{}
\For {$i = 1$ to $10$}
\State print $i$
\EndFor
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}
Code: Select all
! Missing \endcsname inserted.
<to be read again>
\ALG@currentblock@2
l.11 \EndFor
?
! Extra \endcsname.
\ALG@makenobeginrepeat ...LG@thisblock \endcsname
\relax \def \ALG@thisblock...
l.11 \EndFor
?
! Missing number, treated as zero.
<to be read again>
\ALG@b@2@EndFor@0
l.11 \EndFor
?
! Missing \endcsname inserted.
<to be read again>
\ALG@currentblock@2
l.12 \EndProcedure
?
! Extra \endcsname.
\ALG@makenobeginrepeat ...LG@thisblock \endcsname
\relax \def \ALG@thisblock...
l.12 \EndProcedure
?
! Missing number, treated as zero.
<to be read again>
\ALG@b@2@EndProcedure@0
l.12 \EndProcedure
?
! Missing number, treated as zero.
<to be read again>
\ALG@currentblock@2
l.45 \end{algorithmic}
?
! Missing = inserted for \ifnum.
<to be read again>
\ALG@currentblock@2
l.45 \end{algorithmic}
?
! Missing number, treated as zero.
<to be read again>
\ALG@currentblock@2
l.45 \end{algorithmic}
?
kynan