From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21336 Path: news.gmane.org!not-for-mail From: "luigi.scarso" Newsgroups: gmane.comp.tex.context Subject: Re: Setting up chapter. Date: Tue, 12 Jul 2005 15:15:16 +0200 Message-ID: <42D3C264.1000106@logosrl.it> References: <200507111712.58013.john@wexfordpress.com> <1121117645.9221.5.camel@localhost.localdomain> <200507120832.44826.john@wexfordpress.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1121174198 17963 80.91.229.2 (12 Jul 2005 13:16:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2005 13:16:38 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 12 15:16:35 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsKbm-00059m-Oq for gctc-ntg-context-518@m.gmane.org; Tue, 12 Jul 2005 15:15:34 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 579C412784; Tue, 12 Jul 2005 15:15:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08649-05; Tue, 12 Jul 2005 15:15:30 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E1ABD1279B; Tue, 12 Jul 2005 15:15:29 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 714211279B for ; Tue, 12 Jul 2005 15:15:28 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08796-04 for ; Tue, 12 Jul 2005 15:15:27 +0200 (CEST) Original-Received: from ServerNotes.logosrl.it (unknown [81.208.99.91]) by ronja.ntg.nl (Postfix) with ESMTP id 772AF12784 for ; Tue, 12 Jul 2005 15:15:27 +0200 (CEST) Original-Received: from [192.168.2.85] ([192.168.2.85]) by ServerNotes.logosrl.it (Lotus Domino Release 6.5.1) with ESMTP id 2005071215115390-1955 ; Tue, 12 Jul 2005 15:11:53 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <200507120832.44826.john@wexfordpress.com> X-MIMETrack: Itemize by SMTP Server on ServerNotes/Logo(Release 6.5.1|January 21, 2004) at 12/07/2005 15.11.53, Serialize by Router on ServerNotes/Logo(Release 6.5.1|January 21, 2004) at 12/07/2005 15.11.55, Serialize complete at 12/07/2005 15.11.55 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21336 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21336 John R. Culleton wrote: >On Monday 11 July 2005 09:34 pm, Stuart Jansen wrote: > > >>On Mon, 2005-07-11 at 17:12 +0000, John R. Culleton wrote: >> >> >>>I am trying to set up chapter heads a certain way and my code >>>keeps getting uglier. Here are the specs: >>> >>>1. Chapter number centered, with decorations on either side. >>>2. Chapter title centered below chapter number. >>>3. Additional decoration centered below chapter title. >>>4. Both number and text show up in TOC in normal Context manner. >>> >>>Can this be done easily using the normal chapter macro or should >>>I do it all from scratch? (If I roll my own I worry about getting >>>info to the TOC.) >>> >>> >>I am doing something like that now. Sorry the example isn't very pretty, >>had to rip out parts that were specific to the font I'm using, but >>should give you an idea of what you need to do. >> >>===== >> >> >Your example was very helpful. Using it, and with some more >RTFM, I came up with this configuration: > >\setuphead[chapter][numbercommand=\numcommand,page=right, >header=none,textcommand=\texcommand,align=right] > >\def\numcommand#1{\hfil\webo m\hfil\tfd#1\hfil\webo m\hfil\break} > >\def\texcommand#1{\hfil #1 \hfil\crlf\deco} > > >My problem remains with the horizontal alignment of the chapter >text. I have tried left, right, normal, broad. All I want to do >is center it, per my specification 2 above. > >Webo is the webomints dingbat font. > > Maybe this can help you ? \def\Command#1#2{\ruledvbox{\hbox to \textwidth{\hfill #1 \hfill}\\% \hbox to \textwidth{\hfill #2 \hfill}\\% \hbox to \textwidth{\hfill deco! \hfill}}} \def\NCommand#1{\framed{#1}}% Insert here other stuff for decorate number \def\TCommand#1{\framed{#1}}% Insert here other stuff for decorate text \setuphead[chapter][command=\Command,numbercommand=\NCommand,textcommand=\TCommand] Warning: \completecontent has a bizzarre look. luigi