From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11031 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: Inserting a mini toc into the chapter heading Date: Fri, 14 Feb 2003 14:32:09 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20030214142846.027cd2a8@server-1> References: <5.1.0.14.1.20030211130603.03527c58@server-1> <5.1.0.14.1.20030213175042.0276a5d8@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1045229781 8708 80.91.224.249 (14 Feb 2003 13:36:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2003 13:36:21 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jfwg-00021q-00 for ; Fri, 14 Feb 2003 14:32:02 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id C777F10AF0; Fri, 14 Feb 2003 14:34:17 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 49CD510AE9 for ; Fri, 14 Feb 2003 14:32:18 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id h1EDWCUY005990 for ; Fri, 14 Feb 2003 14:32:12 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.3/8.12.2) with ESMTP id h1EDWGt5005567 for ; Fri, 14 Feb 2003 14:32:16 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11031 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11031 At 09:10 PM 2/14/2003 +0800, you wrote: >For all you propeller-heads that like to see bad code here's my >chapter heading setup: > >-------------------------------------------------- > >%output=pdf > >%% chapter head layout >\setupcolors[state=start] >\setuplist[section] > [style=boldslanted, > align=right, > interaction=all, > symbol=1, > width=0.5em, > pagenumber=no, > before=, > after=] >\setuphead[chapter] > [header=empty, > numberstyle=ChapterTitleNumberFont, > textstyle=ChapterTitleTextFont > alternative=command, > command=\ContentsHead, > page=right, > after={\blank[2*big]}] >\definefont[ChapterTitleTextFont][Serif at 24.9pt] >\definefont[ChapterTitleNumberFont][SerifBold at 40pt] >\def\ContentsHead#1#2% > {\setupframed[frame=off] ^ add % here to prevent spurious space > \framed[width=\hsize,offset=overlay] > {\placesidebyside > {\doifelsenothing{#1} or \doifmodeelse{*sectionnumber} > {\framed [width=.6\hsize]{}} % dummy > {\framed [width=.6\hsize,offset=1em,strut=no,align=right, > background=screen] > {\vi In this chapter: \blank > \placelist[section][criterium=chapter]}}} > {\framed [width=.4\hsize,strut=no,align=left] > %% Typeset Chapter Number > {\hbox{\vbox to 24.9pt{% height ChapterTitleTextFont > \vss > #1}}} > \vfilll} > }% > %% Typeset Chapter Title > \llap{\lower24.9pt\hbox{#2\hskip0.5em}}} > >\showmakeup i didn't look how it looks (so i will not comment on that) about bad code: you will always need some low level coding to achieve certain effects; also the code does not look that bad -) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------