From: Mathieu DUPONT <mathieudupont@hotmail.com>
To: ConTeXt <ntg-context@ntg.nl>
Subject: Re: TOC : Chapter title under its number (separate lines)
Date: Tue, 24 May 2011 09:09:39 -0400 [thread overview]
Message-ID: <COL107-W17343B94842C293CEF3B6EB2750@phx.gbl> (raw)
In-Reply-To: <8B201B00-D1EE-45E0-855D-8E76D3F88C50@googlemail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2455 bytes --]
That was very useful !!
Again, thank you very much Wolfgang !
Mathieu
From: schuster.wolfgang@googlemail.com
Date: Tue, 24 May 2011 13:42:41 +0200
To: ntg-context@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
\startfrontmatter\completecontent\stopfrontmatter
\startbodymatter\chapter{Title of chapter}\section{Title of section}\stopbodymatter
\stoptext
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:
\setuplabeltext[chapter=CHAPTER~]
% \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}}
\setuplist[chapter][label=yes,alternative=command,command=\ChapterList]
\starttext
\startfrontmatter\completecontent\stopfrontmatter
\startbodymatter\chapter{Title of chapter}\section{Title of section}\stopbodymatter
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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
___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 4881 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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 prev parent reply other threads:[~2011-05-24 13:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 22:59 Mathieu DUPONT
2011-05-24 11:42 ` Wolfgang Schuster
2011-05-24 13:09 ` Mathieu DUPONT [this message]
2011-05-24 13:33 ` Mathieu DUPONT
2011-05-24 14:04 ` Wolfgang Schuster
2011-05-24 14:13 ` Mathieu DUPONT
2011-05-24 14:20 ` Wolfgang Schuster
2011-05-24 14:34 ` Mathieu DUPONT
2011-05-26 15:13 ` Alan Braslau
2011-05-26 15:30 ` Wolfgang Schuster
2011-05-26 16:48 ` Alan Braslau
2011-05-26 18:16 ` Wolfgang Schuster
2011-05-27 9:14 ` Alan Braslau
2011-05-27 13:33 ` Mathieu DUPONT
2011-05-27 14:00 ` Alan Braslau
2011-05-27 14:04 ` Mathieu DUPONT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=COL107-W17343B94842C293CEF3B6EB2750@phx.gbl \
--to=mathieudupont@hotmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).