[NTG-context] Center a framedtext

Wolfgang Schuster schuster.wolfgang at gmail.com
Sun Sep 25 22:41:16 CEST 2016


> Fabrice Couvreur <mailto:fabrice1.couvreur at gmail.com>
> 23. September 2016 um 19:46
> Hello,
> How to make the algorithm is centered vertically and horizontally?
> thank you,
> Fabrice
>
> \defineframedtext
>   [algorithmframe]
>   [width=fit,
>    background=color,
>    backgroundcolor=lightgray,
>    framecolor=darkred,
>    corner=round]
>
> \definelines
>   [algorithm]
>   [space=on,
>    before=\startalgorithmframe,
>    after=\stopalgorithmframe]
>
> \starttext
>
> \startlinecorrection[blank]
> \startmidaligned
Replace these two lines with \startmakeup[standard][align=middle]
> \startalgorithm
> Initialisation :
>   \math{u} prend la valeur 2\,000
>   \math{S} prend la valeur 2\,000
> Traitement :
>   Pour \math{i} allant de 2 à \math{n}
>      \math{u} prend la valeur \math{u\times 1,008}
>      \math{S} prend la valeur \math{S +u}
>   Fin Pour
> Sortie :
>   Afficher \math{S}
>
> \stopalgorithm
>
> \stopmidaligned
> \stoplinecorrection
Replace these two lines with \stopmakeup.

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160925/862bf78d/attachment.html>


More information about the ntg-context mailing list