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
___________________________________________________________________________________
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