An algorithm that spans two pages in latex

I have a long algorithm that I need to add to the report. I am using latex for this report. but due to the length of the algorithm, this is more than one page, but I cannot make it fit into the next page. I am new to latex. can someone tell me how to do this? I am new to latex.

+3
source share
2 answers

divide it into two. If you use one of the packages that allows you to number the lines, tell the other half to start with the line number, which is one plus the number of the last line.

You can probably get better answers if you tell us which package you use to format your algorithm (or ask for suggestions, I had good results with listings ").

0
source

You must break the algorithm into two parts. You can simply chop it in half, as suggested by redtuna, or, even better, you can split an interesting piece into a new function and put it on a separate page. This is likely to make the algorithm more readable.

+2
source

Source: https://habr.com/ru/post/1743070/


All Articles