From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: TOC : Chapter title under its number (separate lines)
Date: Tue, 24 May 2011 13:42:41 +0200 [thread overview]
Message-ID: <8B201B00-D1EE-45E0-855D-8E76D3F88C50@googlemail.com> (raw)
In-Reply-To: <col107-w2729F89D15B440526EBDEB2720@phx.gbl>
[-- Attachment #1.1: Type: text/plain, Size: 1841 bytes --]
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 :
>
> Contents
> CHAPTER 1
> Title of chapter 2
> 1.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 2
> 1.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-command
for 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
[-- Attachment #1.2: Type: text/html, Size: 3915 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 11:42 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 [this message]
2011-05-24 13:09 ` Mathieu DUPONT
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=8B201B00-D1EE-45E0-855D-8E76D3F88C50@googlemail.com \
--to=schuster.wolfgang@googlemail.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).