From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87224 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: Some problems with a new style for the sections Date: Sun, 04 May 2014 14:56:43 -0400 Message-ID: <53668D6B.1020404@rik.users.panix.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1926352123==" X-Trace: ger.gmane.org 1399229832 32513 80.91.229.3 (4 May 2014 18:57:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 18:57:12 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun May 04 20:57:08 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wh1b1-0008TE-H2 for gctc-ntg-context-518@m.gmane.org; Sun, 04 May 2014 20:57:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1F6981022D for ; Sun, 4 May 2014 20:57:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cU9SH2JA+xjg for ; Sun, 4 May 2014 20:57:07 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F3C0F10230 for ; Sun, 4 May 2014 20:57:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3697C101E2 for ; Sun, 4 May 2014 20:56:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id T2-OcNpZARLZ for ; Sun, 4 May 2014 20:56:56 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id AD7F6101E1 for ; Sun, 4 May 2014 20:56:56 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s44Iuk77012642 for ; Sun, 4 May 2014 20:56:55 +0200 Original-Received: from [192.168.201.179] (cpe-67-240-55-150.nycap.res.rr.com [67.240.55.150]) by mailbackend.panix.com (Postfix) with ESMTP id 4E0EB2E2A0 for ; Sun, 4 May 2014 14:56:46 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=Richmond Hill; latitude=40.7005; longitude=-73.8345; http://maps.google.com/maps?q=40.7005,-73.8345&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WLVSULkS - 6131ed62023a - 20140504 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87224 Archived-At: This is a multi-part message in MIME format. --===============1926352123== Content-Type: multipart/alternative; boundary="------------010004050200030807050401" This is a multi-part message in MIME format. --------------010004050200030807050401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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=20 > paragraph. > Regards, > Fabrice > > \setupcolors[state=3Dstart] > \def\MySectionCommand#1#2% > {\framed > [frame=3Doff, > width=3D\textwidth, > align=3D{right}, > background=3Dcolor, > backgroundcolor=3Dlightgray] > {#1\quad#2}} > > \setuphead[section][command=3D\MySectionCommand,numbercolor=3Dred] > > \setupbodyfont[palatino,12pt] > > \starttext > > \MySectionCommand{A.}{D=E9finitions} > \input knuth > \MySectionCommand{1.}{Propri=E9t=E9s} > \input knuth > I think you want ownnumber (in addition to the previously mentioned=20 \section). \setupcolors[state=3Dstart] \define[2]\MySectionCommand {\framed [frame=3Doff, width=3D\textwidth, align=3D{right}, background=3Dcolor, backgroundcolor=3Dlightgray] {#1.\quad#2}} \setuphead[section][command=3D\MySectionCommand,ownnumber=3Dyes,numbe= rcolor=3Dred] \setupbodyfont[palatino,12pt] \starttext \placecontent \section{A}{D=E9finitions} \input knuth \section{1}{Propri=E9t=E9s} \input knuth \section{2}{Propri=E9t=E9s} \input knuth \section{3}{Propri=E9t=E9s} \input knuth \section{B}{D=E9finitions} \input knuth \section{1}{Propri=E9t=E9s} \input knuth \section{2}{Propri=E9t=E9s} \input knuth \stoptext --=20 Rik Kabel --------------010004050200030807050401 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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
--------------010004050200030807050401-- --===============1926352123== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1926352123==--