From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10994 Path: main.gmane.org!not-for-mail From: Guy Worthington Newsgroups: gmane.comp.tex.context Subject: Re: Inserting a mini toc into the chapter heading Date: 13 Feb 2003 11:04:18 +0800 Sender: ntg-context-admin@ntg.nl Message-ID: References: <5.1.0.14.1.20030211130603.03527c58@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 X-Trace: main.gmane.org 1045105026 2616 80.91.224.249 (13 Feb 2003 02:57:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 02:57:06 +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 18j9Yc-0000g4-00 for ; Thu, 13 Feb 2003 03:57:02 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 5D87410B07; Thu, 13 Feb 2003 03:59:15 +0100 (MET) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by ref.ntg.nl (Postfix) with ESMTP id 9B88810AFF for ; Thu, 13 Feb 2003 03:57:40 +0100 (MET) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18j9X2-0000bf-00 for ; Thu, 13 Feb 2003 03:55:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ref.ntg.nl Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18j9Wz-0000bW-00 for ; Thu, 13 Feb 2003 03:55:21 +0100 Original-Lines: 75 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 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:10994 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10994 Just following up on my own post. The following code has the effect I was after. If you want to use it as a template, you'd be advised to read my method in constructing such ugliness. To remind you, I want to increase the font weight of the chapter number, but not increase the font weight of the chapter title. Thus, facing my usual dilemma -- so many commands and no f*cking clues, I added the \string command immediately before the parameter containing the chapter number, #1, to see what #1 actually contained. If you do this, you'll see that #1 contains something else, infact #1 starts out as ``dostartattributes@@ko ... ''. I've no idea how to read the source code, so at this point, I decided to redefine my chapter style parameter \BigHeadFont locally, before #1 is expanded. And so, if you read the code, you'll see a font definition \definefont[BigHeadFont][SerifBold at 40pt] buried deep within the code. This seems to work, although redefining font definitions on the fly is probably not good practice. I also wanted to move the chapter number, up to the top right hand corner of the main text area. I did this increasing the amount of glue until the number was pushed outside its box. Here is the code: %% 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, style=BigHeadFont, alternative=command, command=\ContentsHead, page=right, after={\blank[2*big]}] \definefont[BigHeadFont][Serif at 24.9pt] \def\ContentsHead#1#2% {\setupframed[frame=off] \framed[width=\hsize,offset=overlay] {\placesidebyside {\doifelsenothing{#1} {\framed[width=.6\hsize]{}} % dummy {\framed [width=.6\hsize,offset=1em,strut=no,align=right,background=screen] {{\tfa In this chapter:} \blank \placelist[section][criterium=chapter]}}} {\framed [width=.4\hsize,strut=no,align=left] {\definefont[BigHeadFont][SerifBold at 40pt] %% Typeset Chapter Number \hbox{% \vbox to 24.9pt{% size of BigHeadFont \vss #1}}} \vfilll}} %% Typeset Chapter Title \llap{\lower29.9pt\hbox{#2\hskip1em}}} % 24.9pt x 1.2 \starttext %\showmakeup \chapter {Berend} \section {Botje} \section {Botje} \section {Botje} \stoptext