# Algorithm2e - Unwanted semi-colon

With the following code, I have an unwanted semi-colon at the end of the loop condition.

Here is MWE.

\documentclass{article}
\usepackage[lined]{algorithm2e}

\begin{document}

\begin{algorithm}
\Begin{
\uIf{Condition}{
\Repeat{Stop}{Action}
}
}
\end{algorithm}

\end{document}


How can I change this ?

-
Related Question: ending statements in algorithm2e environment. –  Peter Grill Oct 20 '12 at 8:26

You can also use \DontPrintSemicolon.

-

Use \SetEndCharOfAlgoLine{}:

## Code:

\documentclass{article}
\usepackage[lined]{algorithm2e}

\begin{document}
\SetEndCharOfAlgoLine{}

\begin{algorithm}
\Begin{
\uIf{Condition}{
\Repeat{Stop}{Action}
}
}
\end{algorithm}

\end{document}

-
Thanks. It is strange that there is semi-colons for REPEAT loop but not for WHILE loop. –  projetmbc Oct 20 '12 at 8:25
The OP also has this mistake but there really should have been an end closing the if, just as there is an end closing the begin. It would be nice if you could fix this to show how to use the package properly. –  Marc van Dongen Oct 20 '12 at 9:38