[NTG-context] Use \framedtext to write an algorithm (again)

Fabrice Couvreur fabrice1.couvreur at gmail.com
Wed Oct 17 21:58:42 CEST 2018


Hi Wolfgang,
You offered me the following code to write algorithms. It seems that this
does not function very well because the withdrawal of the text no longer
exists.
Thank you
Fabrice

\defineframedtext
   [algorithmframe]
   [width=fit,
    background=color,
    backgroundcolor=lightgray,
    framecolor=darkred,
    corner=round]

\definelines
   [algorithm]
   [space=on,
    before=\startalgorithmframe,
    after=\stopalgorithmframe]

\starttext

\startalgorithm
Variables \math{I} et \math{J} entiers
T tableau d'entiers
Début
Pour \math{I} allant de \math{1} à \math{3}
    Pour \math{J} allant de \math{1} à \math{3}
      Si \math{J>I}
         Alors \math{T[I, J]=J-I}
         Sinon \math{T[I, J]=0}
      Fin Si
    Fin Pour
Fin
\stopalgorithm

\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181017/500b0204/attachment.html>


More information about the ntg-context mailing list