<div dir="ltr"><div><span id="result_box" class="" lang="en"><span class="hps">Hi</span> <span class="hps">Hans</span><span>,</span><br> <span class="hps">In the document</span> <span class="hps">Metafun</span><span class="">, you use</span> <span class="hps">commands that</span> <span class="hps">I like,</span> <span class="hps">and</span> <span class="hps">I</span> <span class="hps">try to understand</span> <span class="hps">the definition</span> <span class="hps">and operation</span><span>, which</span> <span class="hps">is not always</span> <span class="hps">easy with</span> <span class="hps">TeX</span> <span class="hps">commands.</span><br> <span class="hps">Also, in the</span> <span class="hps">following code</span><span>,</span> <span class="hps">this does not give</span> <span class="hps">the expected result.</span><br> <span class="hps">Thank you.<br></span></span></div><span id="result_box" class="" lang="en"><span class="hps">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></span></span></div>