[NTG-context] Simple tocs
Pablo Rodriguez
oinos at gmx.es
Mon Jan 26 10:13:15 CET 2015
On 01/25/2015 11:52 PM, John Culleton wrote:
> In this country, and perhaps elsewhere, the front
> matter in a technical book will have two tables
> of contents, one listing just major titles (e.g.,
> just chapters and titles or just parts, chapters
> and titles) followed by another one that lists
> sections also.
> [...]
> Any suggestions?
Hi John,
I guess that the following might achieve what you want:
\starttext
\title{Contents}\placelist[chapter]
\title{More Contents}\placelist[chapter,section]
\dorecurse{5}{\chapter{Chapter}
\dorecurse{5}{\section{Section}}}
\stoptext
BTW, why do you use makeups? They are perfect when content fits in a
single page. Otherwise, you get the following (see page 2):
\setuppapersize[A6]
\starttext
\title{Contents}\placelist[chapter]
\startmakeup
\title{More Contents}\placelist[chapter,section]
\stopmakeup
\dorecurse{5}{\chapter{Chapter}
\dorecurse{5}{\section{Section}}}
\stoptext
To avoid page numbering in your tables of contents (and not having to
remove page numbering in frontmatter):
\definesectionblock[whatcomesfirst][firstmatter]
\startsectionblockenvironment[whatcomesfirst]
\setuppagenumbering[location=]
\stopsectionblockenvironment
\setuppapersize[A6]
\starttext
\startfirstmatter
\title{Contents}\placelist[chapter]
\title{More Contents}\placelist[chapter,section]
\stopfirstmatter
\dorecurse{5}{\chapter{Chapter}
\dorecurse{5}{\section{Section}}}
\stoptext
I hope it helps,
Pablo
--
http://www.ousia.tk
More information about the ntg-context
mailing list