# Divide algorithm inside If EndIf

This is a follow-up question to Option in the algorithm with Latex.

This is the code:

 \begin{document}
\begin{algorithm}
\caption{My algorithme}
\begin{algorithmic}[1]
\Donnees: My data
\Statex% Blank line
\Debut
\LState $r\gets a\bmod b$
\While{$r\not=0$}\Comment{We have the answer if r is 0}
\LState $a\gets b$
\LState $b\gets r$
\LState $r\gets a\bmod b$
\If {condition}
\LState instruction
\algstore{testcont}
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[H]
\caption{\textit{second Part}
\begin{algorithmic}[1]
\algrestore{testcont}
\EndIf
\EndWhile\label{euclidendwhile}
\LState \textbf{Retour} $b$\Comment{The gcd is b}
\Fin
\end{algorithmic}
\end{algorithm}
\end{document}


When I try to divide this algorithm inside the if--else with \algrestore{testcont} it does not work! Have you an idea please?

-
 @werner : Please no solution ? – researcher Dec 12 '12 at 10:15