On 2014-05-04 07:21, Fabrice Couvreur wrote:
Hi, I encounter two problems: - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. Regards, Fabrice
\setupcolors[state=start] \def\MySectionCommand#1#2% {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1\quad#2}}
\setuphead[section][command=\MySectionCommand,numbercolor=red]
\setupbodyfont[palatino,12pt]
\starttext
\MySectionCommand{A.}{Définitions} \input knuth \MySectionCommand{1.}{Propriétés} \input knuth
I think you want ownnumber (in addition to the previously mentioned \section). \setupcolors[state=start] \define[2]\MySectionCommand {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1.\quad#2}} \setuphead[section][command=\MySectionCommand,ownnumber=yes,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \placecontent \section{A}{Définitions} \input knuth \section{1}{Propriétés} \input knuth \section{2}{Propriétés} \input knuth \section{3}{Propriétés} \input knuth \section{B}{Définitions} \input knuth \section{1}{Propriétés} \input knuth \section{2}{Propriétés} \input knuth \stoptext -- Rik Kabel