Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\dontprintsemicolon
\SetLine

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
5  
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
add comment

2 Answers

up vote 5 down vote accepted

Try to replace them with

\DontPrintSemicolon
\SetAlgoLined

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
add comment

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:

\providecommand{\SetAlgoLined}{\SetLine}
\providecommand{\DontPrintSemicolon}{\dontprintsemicolon}

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
add comment

Your Answer

 
discard

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.