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.

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'm using algorithm2e package but my algorithm does not fit in only one page. Is there any way to split it over two pages, even if manually?

If doing it manually, we can use two algorithm environments, but there are some issues:

  1. Maintain the line counting - OK, this can be done by calling the package with noresetcount

  2. Remove the caption from the first/second algorithm (depending if we want the caption in the beginning or end) -- how to do it?

  3. Take care of the vertical lines of the indentation, that is, I expect them to "cross" the pages -- how to do it?

share|improve this question

If you don't have to use algorithm2e, you should have a look at the listings package, which supports listings on multiple pages.

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.