TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use the algorithm2e package in MikTeX, but when I put these commands:


it doesn't recognize them. I do not understand why; I have used these commands before in another machine without a problem. The package algorithm2e is installed: I checked in the package manager and the directory and it appears to be installed.

share|improve this question
You should post a complete (but minimal) example, to show us what you're trying to do. Also check which version of the relevant packages you have. – Juan A. Navarro Jan 31 '11 at 15:10
up vote 7 down vote accepted

Try to replace them with


I think that at some point of time (version 4.0 and newer) the old syntax was removed. You can also try to pass the oldcommands option to the package, which should enable the old form of the commands.

share|improve this answer
This works.. but I hate having to do that. – Flethuseo Feb 3 '11 at 16:54

Debian and Ubuntu did not update their texlive-science package for the latest version of algorithm2e. So if you are using algorithm2e and compiling your LaTeX documents on Windows and Linux environment you will bumb to this problem constantly. Simply changing the commands does not help much, since you need to change it everytime you change platform.

My usual solution is to include definitions for new versions of the algorithm2e commands:


Thus, when using old version of the package (Linux) new versions of the commands are defined. If the new version of the package is used and these commands are already defined (Windows), \providecommand directives are simply ignored by MiKTeX.

You can write these commands into a seperate file and include it whenever your document will use algorithm2e and will constantly be compiled at multiple platforms.

Do not forget these commands should be inserted/included after the \usepackage[...]{algorithm2e} stuff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.