From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21325 Path: news.gmane.org!not-for-mail From: Stuart Jansen Newsgroups: gmane.comp.tex.context Subject: Re: Setting up chapter. Date: Mon, 11 Jul 2005 15:34:05 -0600 Organization: Guru Labs, L.C. Message-ID: <1121117645.9221.5.camel@localhost.localdomain> References: <200507111712.58013.john@wexfordpress.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0104054095==" X-Trace: sea.gmane.org 1121117439 1597 80.91.229.2 (11 Jul 2005 21:30:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2005 21:30:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 11 23:30:37 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 1Ds5qe-0007Dx-K3 for gctc-ntg-context-518@m.gmane.org; Mon, 11 Jul 2005 23:29:57 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CD592127BE; Mon, 11 Jul 2005 23:29:55 +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 32386-07; Mon, 11 Jul 2005 23:29:52 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BEB0D12784; Mon, 11 Jul 2005 23:29:51 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D239E12784 for ; Mon, 11 Jul 2005 23:29:49 +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 32298-06 for ; Mon, 11 Jul 2005 23:29:48 +0200 (CEST) Original-Received: from mail.gurulabs.com (mail.gurulabs.com [67.137.148.7]) by ronja.ntg.nl (Postfix) with ESMTP id C0C2A1277B for ; Mon, 11 Jul 2005 23:29:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.gurulabs.com (Postfix) with ESMTP id AAA0BB094B for ; Mon, 11 Jul 2005 15:29:44 -0600 (MDT) Original-Received: from mail.gurulabs.com ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 28199-05 for ; Mon, 11 Jul 2005 15:29:43 -0600 (MDT) Original-Received: from dhcp7.glwlan.gurulabs.com (dhcp7.glwlan.gurulabs.com [10.2.3.7]) by mail.gurulabs.com (Postfix) with ESMTP for ; Mon, 11 Jul 2005 15:29:43 -0600 (MDT) Original-To: mailing list for ConTeXt users In-Reply-To: <200507111712.58013.john@wexfordpress.com> X-Mailer: Evolution 2.2.1.1 X-Virus-Scanned: by amavisd-new at gurulabs.com 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:21325 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21325 --===============0104054095== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-bxrebxpvrb+c++j4Zdrw" --=-bxrebxpvrb+c++j4Zdrw Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: >=20 > 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. >=20 > 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. =3D=3D=3D=3D=3D \unexpanded\def\chaptercase{\uppercase} \def\mychapter#1#2% {\setupframed[width=3D1.75in,align=3D{right,broad},frame=3Doff]\vbox{%=20 \framed{\setupbodyfont[18pt]\setupinterlinespace[height=3D0,depth=3D0]Chapt= er}% \framed{\setupbodyfont[36pt]\setupinterlinespace[height=3D.1,depth=3D0]#1}= % \godown[-1ex]\framed{\setupbodyfont[24pt]\setupinterlinespace[line=3D2ex]#2= \par}% }} \setuphead [chapter] [command=3D\mychapter,textcommand=3D\chaptercase, textstyle=3D\sl,numberstyle=3D\bf] \starttext \placelist[chapter,section][criterium=3Dall,alternative=3Db] \chapter{foo} \chapter{bar} \stoptext =3D=3D=3D=3D=3D --=20 Stuart Jansen Guru Labs, L.C. --=-bxrebxpvrb+c++j4Zdrw Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBC0uXMwTOJ4P81PNARAqLNAJ481gsgvr1FAnEyFw1915i8vF4WdwCfXPbl uCjVvQLYcnXDUz7BL3RRPek= =l0vR -----END PGP SIGNATURE----- --=-bxrebxpvrb+c++j4Zdrw-- --===============0104054095== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============0104054095==--