<div dir="ltr"><span id="result_box" class="" lang="en"><span class="hps">Dear</span> <span class="hps">Hans</span><span class="">,</span><br> <span class="hps">I tested</span> <span class="hps">without understanding</span> <span class="hps">what</span> <span class="hps">\</span><span class="hps">unexpanded</span><span>, and of course</span> <span class="hps">it works</span><span> !</span><br> <span class="hps">Thank you,</span><br> <span class="hps">Fabrice</span></span></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-09 15:40 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 class="HOEnZb"><div class="h5">On 8/9/2015 1:27 PM, Fabrice Couvreur wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Hans,<br>
In the document Metafun, you use commands that I like, and I try to<br>
understand the definition and operation, which is not always easy with<br>
TeX commands.<br>
Also, in the following code, this does not give the expected result.<br>
Thank you.<br>
Fabrice<br>
<br>
\showframe<br>
<br>
\setupcolors<br>
   [state=start]<br>
<br>
\setuppagenumbering[location=,alternative]<br>
<br>
\startuniqueMPgraphic{titled}<br>
path p ;<br>
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;<br>
pickup pencircle scaled 1mm ;<br>
drawoptions(withcolor .625yellow) ;<br>
draw llcorner p--lrcorner p ;<br>
setbounds currentpicture to p ;<br>
\stopuniqueMPgraphic<br>
<br>
\defineoverlay[titled][\uniqueMPgraphic{titled}]<br>
<br>
\def\ChapterCommand#1#2%<br>
   {\setbox0=\hbox to \leftmarginwidth{#1\hss}%<br>
    \hskip-\leftmarginwidth<br>
    \hskip-\leftmargindistance<br>
    \framed<br>
      [background=titled,frame=off,offset=0pt]<br>
      {\box0<br>
       \hskip\leftmargindistance<br>
       #2}}<br>
<br>
\setuphead<br>
   [chapter,section,subsection]<br>
   [command=\ChapterCommand,<br>
    color=darkred]<br>
<br>
\starttext<br>
\chapter{First}<br>
\section{First}<br>
\subsection{First}<br>
\stoptext<br>
</blockquote>
<br></div></div>
\unexpanded\def\ChapterCommand#1#2%<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>