LaTeX forum ⇒ Document Classes ⇒ ! LaTeX Error: Command \algorithm* already defined.

Information and discussion about specific document classes and how to create your own document classes.
gumel81
Posts: 1
Joined: Tue Sep 17, 2013 2:46 pm

! LaTeX Error: Command \algorithm* already defined.

Hello,

currently I’m working on a scientific paper. The publisher provided me with a template (see http://www.worldscientific.com/page/ijc ... -readme-2e). Here is a minimal example:

documentclass{ws-ijcis}\begin{document}Test\end{document}

Now I would like to include the package algorithm2e. The code looks like this:

\documentclass{ws-ijcis}\usepackage{algorithm2e}\begin{document}Test\end{document}

Unfortunately, I receive an error:

! LaTeX Error: Command \algorithm* already defined.Or name \end... illegal, see p.192 of the manual.See the LaTeX manual or LaTeX Companion for explanation.

How can I solve this issue? Unfortunately I cannot use another package (I have to use algorithm2e)

Thanks for your help.

Tags:

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to MrUnix and goLaTeX (two German LaTeX forums) and already got an answer. Please read what our administrator thinks about that.

Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.

The class defines a theorem-like environment algorithm. Contact the class maintainer(s) and ask for help. There is detailed contact information on the mentioned site for the case of upcoming problems.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

david611
Posts: 1
Joined: Thu May 03, 2018 8:30 pm
I have exactly the same problem. I managed to undefine the algorithm environment as follows:

\makeatletter
\let\algorithm\@undefined
\let\endalgorithm\@undefined
\makeatother

but when I tried the same thing for algorithm* :

\makeatletter
\let\algorithm\@undefined
\let\endalgorithm\@undefined
\let\algorithm*\@undefined
\let\endalgorithm*\@undefined
\makeatother

I got the LaTex error:

Undefined control sequence.
1.6 \let\algorithm*\@undefined

Can anyone tell me how to undefine the algorithm* environment?

Johannes_B
Site Moderator
Posts: 3953
Joined: Thu Nov 01, 2012 4:08 pm
Hi and welcome,

please open a new thread. A minimal working example would also be needed in order to help.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.