Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
@werner : Please no solution ? –  researcher Dec 12 '12 at 10:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.