1

I have a pseudocode which spreads in multiple pages.

I tried \algstore and \algrestore (as advised in Algorithm over 2 pages) and it allows multiple pages but it causes problem with \listofalgorithms and it adds one line for each part.

How can I make sure that it just adds for the first part?

Reza
  • 415

1 Answers1

1

I just used \caption* for the second occurrence of algorithm block and it is all good now :)

\documentclass{article}
\usepackage{algpseudocode}
\usepackage{algorithm}

\begin{document}

\begin{algorithm}                     
\caption{Algorithm XYZ}          
\label{findme}                          
\begin{algorithmic}[1]
\State Do Something 1
\State Do Something A
\State Do Something B
\State Do Something C
\algstore{myalg}
\end{algorithmic}
\end{algorithm}

\begin{algorithm} 
\caption*{Algorithm~\ref{findme} Continue ...}
\begin{algorithmic} [1]                  
\algrestore{myalg}
\State Do Something D
\State Do Something E
\State Do Something F
\end{algorithmic}
\end{algorithm}

\end{document}
Reza
  • 415