* Center a framedtext
@ 2016-09-23 17:46 Fabrice Couvreur
2016-09-25 20:41 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2016-09-23 17:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 792 bytes --]
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
\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
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 1184 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] 5+ messages in thread
* Re: Center a framedtext
2016-09-23 17:46 Center a framedtext Fabrice Couvreur
@ 2016-09-25 20:41 ` Wolfgang Schuster
2016-09-27 20:02 ` Fabrice Couvreur
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2016-09-25 20:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1013 bytes --]
> Fabrice Couvreur <mailto:fabrice1.couvreur@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
[-- Attachment #1.2: Type: text/html, Size: 2836 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] 5+ messages in thread
* Re: Center a framedtext
2016-09-25 20:41 ` Wolfgang Schuster
@ 2016-09-27 20:02 ` Fabrice Couvreur
2016-09-28 7:08 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2016-09-27 20:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 927 bytes --]
>
> Hi Wolfgang,
Thank you for your suggestion, but I think I was not clear enough. In fact, I
want to place the algorithm as the image.
Fabrice
\defineframedtext
[algorithmframe]
[width=fit,
background=color,
backgroundcolor=lightgray,
framecolor=darkred,
corner=round]
\definelines
[algorithm]
[space=on,
before=\startalgorithmframe,
after=\stopalgorithmframe]
\starttext
\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
\stopmakeup
\startlinecorrection[blank]
\startmidaligned
\externalfigure[cow.pdf]
\stopmidaligned
\stoplinecorrection
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 1709 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] 5+ messages in thread
* Re: Center a framedtext
2016-09-27 20:02 ` Fabrice Couvreur
@ 2016-09-28 7:08 ` Wolfgang Schuster
2016-09-28 16:33 ` Fabrice Couvreur
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2016-09-28 7:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 933 bytes --]
> Fabrice Couvreur <mailto:fabrice1.couvreur@gmail.com>
> 27. September 2016 um 22:02
> Hi Wolfgang,
> Thank you for your suggestion, but I think I was not clear enough. In
> fact, I want to place the algorithm as the image.
You need also "location=middle" for the framedtext.
\defineframedtext
[algorithmframe]
[width=fit,
location=middle,
background=color,
backgroundcolor=lightgray,
framecolor=darkred,
corner=round]
\definelines
[algorithm]
[space=on,
before=\startalgorithmframe,
after=\stopalgorithmframe]
\starttext
\startmakeup[standard]
\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
\stopmakeup
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2533 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] 5+ messages in thread
* Re: Center a framedtext
2016-09-28 7:08 ` Wolfgang Schuster
@ 2016-09-28 16:33 ` Fabrice Couvreur
0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2016-09-28 16:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1662 bytes --]
Hi Wolfgang,
Thanks.
Fabrice
2016-09-28 9:08 GMT+02:00 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
> Fabrice Couvreur <fabrice1.couvreur@gmail.com>
> 27. September 2016 um 22:02
> Hi Wolfgang,
> Thank you for your suggestion, but I think I was not clear enough. In
> fact, I want to place the algorithm as the image.
>
> You need also "location=middle" for the framedtext.
>
> \defineframedtext
> [algorithmframe]
> [width=fit,
> location=middle,
> background=color,
> backgroundcolor=lightgray,
> framecolor=darkred,
> corner=round]
>
> \definelines
> [algorithm]
> [space=on,
> before=\startalgorithmframe,
> after=\stopalgorithmframe]
>
> \starttext
>
> \startmakeup[standard]
> \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
> \stopmakeup
>
> \stoptext
>
> Wolfgang
>
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>
[-- Attachment #1.2: Type: text/html, Size: 3929 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] 5+ messages in thread
end of thread, other threads:[~2016-09-28 16:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 17:46 Center a framedtext Fabrice Couvreur
2016-09-25 20:41 ` Wolfgang Schuster
2016-09-27 20:02 ` Fabrice Couvreur
2016-09-28 7:08 ` Wolfgang Schuster
2016-09-28 16:33 ` Fabrice Couvreur
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).