[NTG-context] TOC : Chapter title under its number (separate lines)

Mathieu DUPONT mathieudupont at hotmail.com
Tue May 24 15:09:39 CEST 2011

That was very useful !!
Again, thank you very much Wolfgang !


From: schuster.wolfgang at googlemail.com
Date: Tue, 24 May 2011 13:42:41 +0200
To: ntg-context at ntg.nl
Subject: Re: [NTG-context] TOC : Chapter title under its number (separate	lines)

Am 24.05.2011 um 00:59 schrieb Mathieu DUPONT:Hi,
Is there a simple way to obtain the following result in the table of content :
ContentsCHAPTER 1Title of chapter                        21.1    Title of section                2
(the chapter title underneath its number and left aligned, just like everything else)
The following code used to do the job with MkII but it doesn't anymore with MkIV :
\setuplabeltext[chapter=CHAPTER~]\setuplist[chapter][label=yes, style={\blank[0cm]}]	\starttext
\startbodymatter\chapter{Title of chapter}\section{Title of section}\stopbodymatter
Instead, I get something like this (I hope it turns out readable through the email) :
Contents    CHAPTER 1  Title of chapter                        21.1    Title of section                2
where the 2 lines of the chapter, together with their alignment with the frame, get tossed to the right...
I do get with MkIV the first example like you expect but “style={\blank[0cm]}”is the wrong way. Such a layout can be easily done with your own list-commandfor chapter but the labeltext is tricky:
% \define[3]\ChapterList % no label!%   {#1\crlf#2\wordright{#3}}
% \define[3]\ChapterList % fixed label, wrong for appendices!%   {\labeltext{chapter}#1\crlf#2\wordright{#3}}
\define[3]\ChapterList  {\currentlistsymbol\crlf#2\wordright{#3}}
\startbodymatter\chapter{Title of chapter}\section{Title of section}\stopbodymatter

If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110524/3989cf01/attachment-0001.html>

More information about the ntg-context mailing list