<div dir="ltr"><span id="result_box" class="" lang="en"><span style="font-family:verdana,sans-serif"><span class="">The following macro</span> <span>places the title</span> </span><span><span style="font-family:verdana,sans-serif">right<br><br>\unexpanded\def\HeadTitle#1#2%<br>  {\framed<br>    [frame=off, <br>    width=broad,<br>    align={broad,nothyphenated,left}]<br>    {#1\blank#2}}</span><br></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-06 23:22 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 lang="en"><span>I<span style="font-family:verdana,sans-serif"> wish</span></span><span style="font-family:verdana,sans-serif"> <span>the chapter title</span> <span>on right of</span> <span>the page.</span> <span>The numbering of the</span> <span>chapters</span> <span>is fixed</span> <span>at 0</span><span>, why ?</span><br><span>thank you,</span><br><span>Fabrice<br><br><img src="cid:ii_iqbe409o0_155c216d6f5d6ef5" height="155" width="493"><br>​<br>\unexpanded\def\HeadTitle#1#2%<br>  {\vbox \bgroup<br>   \setupframed[offset=0.5em,frame=off]<br>   \inframed[width=fit,align=right]{#1}%<br>   \inframed[width=fit,align=right]{#2}%<br>   \egroup}<br><br><br>\startusableMPgraphic{chapter}<br>      picture r ;<br>      r := image ( graphictext<br>        \MPstring{chapter}<br>        scaled 3pt<br>        withfillcolor \MPcolor{lightgray}<br>        withpen pencircle scaled 1pt ; ) ;<br>      draw r ;<br>    \stopusableMPgraphic<br><br>\unexpanded\def\processMPheadnumber#1%<br>  {\setMPtext{chapter}{\bf#1}<br>   \useMPgraphic{chapter}}<br><br>\setuphead<br>   [chapter]<br>   [command=\HeadTitle,<br>    numbercommand=\processMPheadnumber{\currentheadnumber}]<br><br>\starttext<br><br>\startchapter<br>  [title={Séries statistiques à deux variables}]<br><br><br>\stopchapter<br><br>\startchapter<br>  [title={Matrice}]<br><br><br>\stopchapter<br><br>\startchapter<br>  [title={Graphe}]<br><br><br>\stopchapter<br><br>\stoptext <br><br></span></span></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-07-06 16:24 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>Thank you</span> <span>Hans</span><span>, the code</span> <span>would be</span><span> :</span><span><br><br>\unexpanded\def\HeadTitle#1#2%<br>  {\hbox to \hsize \bgroup<br></span>   \hfill<br>   \setupframed[offset=0.5em,frame=off]<br>   \inframed[width=fit,align=left,frame=off]{\darkred#1}%<span><br>   \inframed[width=fit,align=right,leftframe=on,rulethickness=4pt,framecolor=darkred]{#2}%<br>   \egroup}<br></span></span><br></span><span lang="en"><span style="font-family:verdana,sans-serif"><span lang="en"><span>Thank you</span> <span>Hans</span><span>, the code</span> <span>would be</span><span>:</span><br><span>Could I ask</span> <span>you</span> <span>how to have</span> <span>the chapter number</span> <span>is</span> <span>like</span> <span>the</span> <span><a href="http://www.pragma-ade.nl/general/manuals/cont-enp.pdf" target="_blank">http://www.pragma-ade.nl/general/manuals/cont-enp.pdf</a></span> <span>book?</span><br><span>This is a</span> <span>macro</span> <span>Metafun</span><span></span><span></span><span> but I</span> <span>do not quite understand</span> <span>the mechanism</span><span>.</span><br><span>thank you,</span><br><span>Fabrice</span></span></span><br><span></span></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-06 15:03 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"><span>On 7/6/2016 1:37 PM, Fabrice Couvreur wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
Hello,<br>
In the manual, there is the macro below.<br></span>
Why theword "Matrice" is not on the same baseline as the number "1" ?<span><br>
thank you,<br>
Fabrice<br>
<br>
\unexpanded\def\HeadTitle#1#2%<br>
  {\hbox to \hsize \bgroup<br>
   \setupframed[height=1cm,offset=0.5em,frame=on]<br>
   \framed[width=fit,align=left]{\darkred#1}%<br>
<br>
\framed[width=fit,align=right,leftframe=on,rulethickness=4pt,framecolor=darkred]{#2}%<br>
    \egroup}<br>
<br>
\setuphead<br>
   [chapter]<br>
   [command=\HeadTitle]<br>
<br>
\starttext<br>
<br>
\startchapter<br>
  [title={Matrice}]<br>
<br>
<br>
\stopchapter<br>
<br>
\stoptext<br>
</span></blockquote>
<br>
fonts and such ... better use:<span><br>
<br>
\unexpanded\def\HeadTitle#1#2%<br>
  {\hbox to \hsize \bgroup<br></span>
   \inframed[width=fit,align=left]{\darkred#1}%<br>
<br>
\inframed[width=fit,align=right,leftframe=on,rulethickness=4pt,framecolor=darkred]{#2}%<br>
   \egroup}<br>
<br>
-----------------------------------------------------------------<br>
                                          Hans Hagen | PRAGMA ADE<br>
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands<br>
       tel: 038 477 53 69 | <a href="http://www.pragma-ade.nl" rel="noreferrer" target="_blank">www.pragma-ade.nl</a> | <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>
</div></div></blockquote></div><br></div>