0

The post Vertical lines in algpseudocode shows how to add vertical lines for the blocks of code. But, how does one break algpseudocode algorithms that are too long for one page to still have the same algorithm number, and also have the line number continue on the next page (without restarting the line count).

  • Worst case, see https://tex.stackexchange.com/questions/204703/multicols-not-breaking-procedures-in-algorithm2e/204792?r=SearchResults&s=19|8.2377#204792 – John Kormylo Sep 26 '20 at 14:10
  • Thank you John. Your link may come in handy, especially for journal papers where they strongly encourage you to reduce the page count. Hopefully, someone can come up with a solution. The code sample below works, but not for the algpseudocode package.

    \begin{algorithm} \begin{algorithmic} \caption{Part 1} \algstore{bkbreak}%--------------------- ... \end{algorithmic} \end{algorithm}

    and

    \addtocounter{algorithm}{-1} \begin{algorithm} \caption{Part 2} \begin{algorithmic}[1] \algrestore{bkbreak}%--------------------- ... \end{algorithmic} \end{algorithm}

    – Hanz Schmidt Sep 27 '20 at 12:18

0 Answers0