<div dir="ltr"><span lang="en"><span style="font-family:verdana,sans-serif"><span>How to center</span> </span><span><span style="font-family:verdana,sans-serif">the title ? </span><br></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-05 20:11 GMT+02:00 Fabrice Couvreur <span dir="ltr"><<a href="mailto:fabrice1.couvreur@gmail.com" target="_blank">fabrice1.couvreur@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:verdana,sans-serif"><span lang="en"><span>Hi</span> <span>Hans</span><span>,</span><br> <span>In fact, as</span> <span>the loop does</span> <span>not work</span><span>, I</span> <span>have</span> <span>not added to</span> <span>the</span> <span>code.</span><br> <span>It's true that</span> <span>your solution is</span> <span>simple !</span><br> <span>Thank you,</span><br> <span>Fabrice</span></span></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-10-05 19:48 GMT+02:00 Hans Hagen <span dir="ltr"><<a href="mailto:pragma@wxs.nl" target="_blank">pragma@wxs.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 10/5/2015 6:28 PM, Fabrice Couvreur wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I tried to write a loop to display the title, but it does not. How to do ?<br>
Thank you,<br>
Fabrice<br>
<br>
\setuppagenumbering[location=]<br>
<br>
\setupcolors<br>
   [state=start]<br>
<br>
\definecolor[pagecolor][s=.6]<br>
\definecolor[textcolor][r=.6]<br>
<br>
<br>
\startMPinclusions<br>
   color pagecolor ; pagecolor := \MPcolor{pagecolor} ;<br>
   color textcolor ; textcolor := \MPcolor{textcolor} ;<br>
\stopMPinclusions<br>
<br>
\setMPtext{title}{Serie statistiques à deux variables}<br>
<br>
\startuseMPgraphic{Title}<br>
<br>
   path p ; p := OverlayBox  ;<br>
   fill OverlayBox withcolor pagecolor ;<br>
   setbounds currentpicture to OverlayBox ;<br>
<br>
\stopuseMPgraphic<br>
<br>
\defineoverlay[Title][\useMPgraphic{Title}]<br>
<br>
\defineframedtext<br>
   [MyTitle]<br>
   [before={\blank[line,halfline]},<br>
    after={\blank},<br>
    frame=off,<br>
    background=Title,<br>
    width=\textwidth,<br>
    height=fit,<br>
    ]<br>
<br>
\starttext<br>
<br>
\startMyTitle<br>
<br>
\startMPcode<br>
<br>
numeric k ; k :=0 ;<br>
string s ; s := \MPstring{title} ;<br>
picture r ;<br>
r := image (graphictext<br>
         substring (k,k+1) of s<br>
         randomized .5pt<br>
         scaled 5pt<br>
         withfillcolor textcolor<br>
         withpen pencircle scaled 1pt ; ) ;<br>
   draw r ;<br>
<br>
\stopMPcode<br>
<br>
\stopMyTitle<br>
<br>
\stoptext<br>
</blockquote>
<br></div></div>
i see no loop, why not just<br>
<br>
r := image (graphictext<br>
        s<br>
       ....<br>
<br>
<br>
-----------------------------------------------------------------<br>
                                          Hans Hagen | PRAGMA ADE<br>
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands<br>
    tel: 038 477 53 69 | voip: 087 875 68 74 | <a href="http://www.pragma-ade.com" rel="noreferrer" target="_blank">www.pragma-ade.com</a><br>
                                             | <a href="http://www.pragma-pod.nl" rel="noreferrer" target="_blank">www.pragma-pod.nl</a><br>
-----------------------------------------------------------------<br>
___________________________________________________________________________________<br>
If your question is of interest to others as well, please add an entry to the Wiki!<br>
<br>
maillist : <a href="mailto:ntg-context@ntg.nl" target="_blank">ntg-context@ntg.nl</a> / <a href="http://www.ntg.nl/mailman/listinfo/ntg-context" rel="noreferrer" target="_blank">http://www.ntg.nl/mailman/listinfo/ntg-context</a><br>
webpage  : <a href="http://www.pragma-ade.nl" rel="noreferrer" target="_blank">http://www.pragma-ade.nl</a> / <a href="http://tex.aanhet.net" rel="noreferrer" target="_blank">http://tex.aanhet.net</a><br>
archive  : <a href="http://foundry.supelec.fr/projects/contextrev/" rel="noreferrer" target="_blank">http://foundry.supelec.fr/projects/contextrev/</a><br>
wiki     : <a href="http://contextgarden.net" rel="noreferrer" target="_blank">http://contextgarden.net</a><br>
___________________________________________________________________________________</blockquote></div><br></div>
</div></div></blockquote></div><br></div>