Using Algorithm2e in ACM template

If you have tried to use this package to create algorithms in the ACM template for papers, you must be come across this issue. If you only add the packate algorithm2e with something like

\usepackage[ruled,vlined]{algorithm2e}

you should have received a nice errors telling you “1616:Too many }’s” and “1617:Extra \fi \fi”.

To solve this annoying bug, that could make you lose a lot of valuable time, just add the following code before the import of the package.

% For algorithms in ACM template
\makeatletter
\newif\if@restonecol
\makeatother
\let\algorithm\relax
\let\endalgorithm\relax
\usepackage[ruled,vlined]{algorithm2e}

I hope this will be useful for you like was for me 🙂

Cheers

Advertisements

4 comments on “Using Algorithm2e in ACM template

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s