* Module algorithmic
@ 2014-10-18 7:13 Fabrice Couvreur
2014-10-18 17:41 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Couvreur @ 2014-10-18 7:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 949 bytes --]
Hi Wolfgang,
How to reduce the size of the float ?
Best regards,
Fabrice
\usemodule[algorithmic]
\definefloat[algorithm][algorithms]
\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
\setupfloat
[algorithm]
[background=color,
frame=on,
framecolor=H1prime,
backgroundcolor=H4,
width=0.5\textwidth]
\starttext
\placealgorithm[none][]{}
{\startalgorithmic\black
\STATE{\bf Variables :}
\STATE $N$ et $P$ sont deux entiers naturels
\STATE $A$ est un nombre réel
\STATE{\bf Entrée :}
\STATE Demander à l'utilisateur la valeur de $N$
\STATE{\bf Initialisation :}
\STATE Affecter à $A$ la valeur $92\,000$
\STATE{\bf Traitement :}
\STATE Affecter à $P$ la valeur $N-1$
\FOR{$I=1$ to $P$}
\STATE Affecter à $A$ la valeur $1,163 \times A$
\STATE Afficher A
\ENDFOR
\stopalgorithmic}
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 1391 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Module algorithmic
2014-10-18 7:13 Module algorithmic Fabrice Couvreur
@ 2014-10-18 17:41 ` Wolfgang Schuster
2014-10-18 20:56 ` Fabrice
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2014-10-18 17:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 849 bytes --]
> Am 18.10.2014 um 09:13 schrieb Fabrice Couvreur <fabrice1.couvreur@gmail.com>:
>
> Hi Wolfgang,
> How to reduce the size of the float ?
> Best regards,
> Fabrice
>
> \usemodule[algorithmic]
> \definefloat[algorithm][algorithms]
>
>
> \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
> \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
>
> \setupfloat
> [algorithm]
> [background=color,
> frame=on,
> framecolor=H1prime,
> backgroundcolor=H4,
> width=0.5\textwidth]
You have to put a framedtext environment around the algorithmic environment, you can do this by replacing \setupfloat with \setupalgorithmic.
\setupalgorithmic
[algorithmic]
[before={\startframedtext[width=0.6\textwidth,background=color,backgroundcolor=H4,framecolor=H1prime]},
after={\stopframedtext}]
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2067 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Module algorithmic
2014-10-18 17:41 ` Wolfgang Schuster
@ 2014-10-18 20:56 ` Fabrice
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice @ 2014-10-18 20:56 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 25 bytes --]
Thanks Wolfgang,
Fabrice
[-- Attachment #1.2: Type: text/html, Size: 274 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-18 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 7:13 Module algorithmic Fabrice Couvreur
2014-10-18 17:41 ` Wolfgang Schuster
2014-10-18 20:56 ` Fabrice
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).