I am writing pseudo code in the algorithmic environment. It is quite long and doesn't fit on one single page. Instead of it continuing on the next page, it is cut off. I tried inserting it into a figure environment, but the problem persists. Is there a solution to have the code continue on the next page?
[Tex/LaTex] Pseudo code to be spread over multiple pages
floatspage-breakingpseudocode
Best Answer
If you do not want the algorithm to float, just use the
algorithmic
environment without thealgorithm
environment.Otherwise, you can use the
algorithmicx
package. It allows breaking long algorithms in parts, preserving line numbers and indentation. You can also combine this withcaption
's\ContinuedFloat
to get proper algorithm numbering:(The algorithm example is taken from
algorithmicx
's documentation.)