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

For some reason even when I enable \DontPrintSemicolon there are still semicolons on lines with comments. This is in Algorithm2e version 3.9.

\usepackage[lined,boxed]{algorithm2e}% using version 3.9

\newcommand*{\DontPrintSemicolon}[0]{\dontprintsemicolon}%remove for 5.0

%define defaults for algorithm2e
\let \oriAlgorithm=\algorithm
  \oriAlgorithm  % Begin document
    \Titleofalgo{ #1 }
    \caption{ #2 }

\newcommand*{\Set}[2]{ #1 $\gets$ #2 }
\newcommand*{\SetC}[3]{ #1 $\gets$ #2 \Comment*[r]{#3} }

  \begin{algorithm}{test}{test to show semicolons existence}
    \SetC{$f$}{$true$}{Some comment}\;
    \Set{$f$}{$\lnot f$}\;

compiled latex png

share|improve this question

closed as off-topic by Werner, Robert, Stefan Kottwitz Nov 9 '13 at 2:50

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Why don't you update to algorithm2e version 5.0? The only historic stable version available is algorithm2e 4.01. If you're stuck with using algorithm2e 3.9, you should make that available somewhere (usually Pastebin). – Werner Nov 8 '13 at 21:07
Welcome to TeX.SX! – Claudio Fiandrino Nov 8 '13 at 21:19
It's the package in tex-science on debian, so it would just be a pain to upgrade. Are you confirming that this was a bug in previous releases? And what do you mean regarding your link to pastebin (make what available)? – nlucaroni Nov 8 '13 at 22:05
This question appears to be off-topic because it is about bug in an outdated version of a package. This bug has been fixed in newer versions. – Werner Nov 9 '13 at 1:14

5.0 documentation states a bug was fixed regarding this issue,

a bug with side text -- text put into () -- of command macro (SetKwIf and so on) which was always setting a ’;’ even after a \DontPrintSemicolon

share|improve this answer
You can literally just download algorithm2e.sty and place it in your working folder. Simple as that. – Werner Nov 9 '13 at 1:15

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