Another worry: when the title is too long, there is a line break, which is normal, but what follows is under the dial.
Thanks,
Fabrice

% macros=mkvi
\setuppapersize[A4][A4]

\setuphead
    [section]
    [sectionstopper={},
    conversion=Characters,
        sectionsegments=section:section]

\setuphead
    [subsection]
    [sectionstopper={},
    sectionsegments=subsection:subsection,
    conversion=number,]

\setupcolors[state=start,cmyk=yes,mpcmyk=yes]
\definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00]
\definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3]

\starttext

\startuniqueMPgraphic{funny}
     numeric h ; h := OverlayHeight ;
     path    p ; p := unitsquare xscaled \overlaywidth yscaled
\overlayheight superellipsed 0.9 ;
     pickup pencircle scaled \overlaylinewidth ;
     fill p withcolor \MPcolor{\overlaycolor} ;
     draw (20,-1)--(20,h+1) withcolor red ;
     clip currentpicture to p ;
     draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic

\defineoverlay[funny][\uniqueMPgraphic{funny}]

\define[2]\MySectionCommand
       {\framed
          [background=funny,
           frame=off,
           width=fit,
           align={right},
           framecolor=mycolor,
           rulethickness=1.5pt,
           backgroundcolor=white,
           offset=6pt]
          {#1\space\colortext#2}}

\setuphead[section][command=\MySectionCommand,ownnumber=yes,numbercolor=colortext]

\section{A}{REPRÉSENTATION EN PERSPECTIVE CAVALIÈRE ET RÈGLES DE BASE}
\subsection{Représentation en perspective cavalière de solides}
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to