I included algorithm2e and start getting error message of "algorithm2e.sty command\procedure already defined." Here are the list of packages in my latex file


\usepackage[vlined,ruled,linesnumbered, algo2e]{algorithm2e}
  • Welcome to TeX.SX! Can you add a pointer to coin.cls?
    – egreg
    Commented Jun 30, 2016 at 22:28

1 Answer 1


If you're referring to coin.cls that forms part of the Computational Intelligence group at Dalhousie University's Department of Computer Science, then the solution is fairly straight-forward if you want to keep using algorithm2e: set the \procedure and \endprocedure macros to \relax.

enter image description here

% https://projects.cs.dal.ca/ci/latex/template-files/coin.cls



  \KwData{this text}
  \KwResult{how to write algorithm with \LaTeX2e }
  \While{not at end of this document}{
    read current\;
      go to next section\;
      current section becomes this one\;
      go back to the beginning of current section\;
  \caption{How to write algorithms}


So if you're not going use these theorem-like structures, then there shouldn't be any other conflict.

Both the algorithm and procedure environments are predefined inside the coin document class as theorems:


The algorithm environment definition is avoided by using the algo2e option of algorithm2e, which creates an algorithm2e float rather than algorithm.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .