Sign up ×
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:

 \caption{My algorithme}
 \Donnees: My data
 \Statex% Blank line
  \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

     \caption{\textit{second Part}
      \LState \textbf{Retour} $b$\Comment{The gcd is b}

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


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

Browse other questions tagged or ask your own question.