Saturday, June 20, 2009

Latex too many }'s - algorithm2e

Algorithm2e package seems to be incompatible
with the ACM latex classes. The error thrown is
similar to that shown here -
! Too many }'s.
l.1616 }

?
The way around this is by including the following
lines before including the algorithm2e package as
follows-

\makeatletter
\newif\if@restonecol
\makeatother
\let\algorithm\relax
\let\endalgorithm\relax
\usepackage{algorithm2e}

Hope it works for all of you! Let me know if
you run into any issue.

11 comments:

S. Fahad said...

Hi, I tried using it with the template from AAMAS (http://www.cse.york.ca/AAMAS2010/#content=authors_instructions) and i am using AMS Math package also and while i got the tex file to compile after the inclusion of above lines, nothing showed up in place of the algorithm and the reference to it appear as ??
appreciate any help, thanks - fahad

Rifat Shahriyar said...

Thanks.

Joey said...

Thank you kindly. I love the algorithm2e package but I have only been publishing in IEEE of late.

Has the ACM or algorithm2e people been informed of this incompatibly.

Benjamin Auffarth said...

As to the previous commenter, I think you have your algorithm defined with the algorithm2e and your problem is that IEEEtran doesn't want the algorithm floating environment. Just change \begin{algorithm}[H] to \begin{figure}[htp] end the environment end tag accordingly from \end{algorithm} to \end{figure}.

Anonymous said...

Did work thanks from Portugal!

Anonymous said...

Thanks a million. You saved my life!! :)

Anonymous said...

Assalam O Alaikum!

Thanks a lot, it worked for me for ACM template

Anonymous said...

it works!!!
many thanks for your precious help!
best wishes

Anonymous said...

A very valuable piece of information!
I get this problem in the Latex distribution of my Ubuntu 11.04 but not Miktex in Windows.

-Eddie

Anonymous said...

thanks a lot for this information. Saved me hours.

Anonymous said...

Thanks! I'm from 2014 and this bug is still not fixed!

Post a Comment