From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21341 Path: news.gmane.org!not-for-mail From: "John R. Culleton" Newsgroups: gmane.comp.tex.context Subject: Re: Setting up chapter. Date: Tue, 12 Jul 2005 16:31:01 +0000 Organization: WexfordPress Message-ID: <200507121631.02038.john@wexfordpress.com> References: <200507111712.58013.john@wexfordpress.com> <200507120832.44826.john@wexfordpress.com> <42D3C264.1000106@logosrl.it> 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" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1121200334 6371 80.91.229.2 (12 Jul 2005 20:32:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2005 20:32:14 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 12 22:32:09 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 1DsRQ9-0003Mq-Qn for gctc-ntg-context-518@m.gmane.org; Tue, 12 Jul 2005 22:32:01 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0A773127D2; Tue, 12 Jul 2005 22:32:01 +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 18731-07-7; Tue, 12 Jul 2005 22:31:55 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 52033127C4; Tue, 12 Jul 2005 22:31:55 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4BD27127C4 for ; Tue, 12 Jul 2005 22:31:54 +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 18731-07-6 for ; Tue, 12 Jul 2005 22:31:53 +0200 (CEST) Original-Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by ronja.ntg.nl (Postfix) with ESMTP id 033C5127C3 for ; Tue, 12 Jul 2005 22:31:52 +0200 (CEST) Original-Received: from 69-174-190-44.frdrmd.adelphia.net ([69.174.190.44]) by mta10.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050712203151.UVKO19267.mta10.adelphia.net@69-174-190-44.frdrmd.adelphia.net>; Tue, 12 Jul 2005 16:31:51 -0400 Original-To: ntg-context@ntg.nl User-Agent: KMail/1.7.2 In-Reply-To: <42D3C264.1000106@logosrl.it> Content-Disposition: inline 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:21341 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21341 On Tuesday 12 July 2005 01:15 pm, luigi.scarso wrote: > 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=\T >Command] > > Warning: \completecontent has a bizzarre look. > > > luigi > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context Some interesting approaches here, for sure. I am hanging on to these posts. I chickened out and did a plain TeX macro. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\Chap#1 #2.{\page[yes] \ifodd\count0\else\noheaderandfooterlines\page[yes]\fi \noheaderandfooterlines \line{\hfil\webo m\hfil\lower 4.5pt\hbox{\it\tfd#1}\hfil\webo m\hfil}\blank[big] \line{\tfc\hfil#2\hfil} \blank[big] \writetolist[chapter]{\tf #1}{\tf #2} \deco } \def\deco{\blank\noindent\hfil\webo 4\hfil\break\blank \rm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% But when time permits I will play with the other approaches mentioned. -- John Culleton Books with answers to marketing and publishing questions: http://wexfordpress.com/tex/shortlist.pdf Book coaches, consultants and packagers: http://wexfordpress.com/tex/packagers.pdf