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@2l.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@0l.11 \EndFor?! Missing \endcsname inserted.<to be read again>\ALG@currentblock@2l.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@0l.12 \EndProcedure?! Missing number, treated as zero.<to be read again>\ALG@currentblock@2l.45 \end{algorithmic}
kynan