I'm using Algorithm2e and want a loop with no intial condition and no ending condition. Using Algorithmic, this can be achieved with \Loop ... \EndLoop, but I cannot find a similar loop for Algorithm2e. How do I do this in Algorithm2e?

  • It's not very clear; can you make an example?
    – egreg
    Dec 4, 2013 at 22:06

1 Answer 1


Something like this, with empty condition?




enter image description here

  • 3
    Or perhaps more elegantly \SetKwBlock{Loop}{Loop}{EndLoop} Sep 6, 2018 at 0:46

You must log in to answer this question.

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