From: Sietse Brouwer <sbbrouwer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: setuphead and Table of Content
Date: Sun, 31 Mar 2013 13:30:14 +0200 [thread overview]
Message-ID: <CAF=dkzxgGXmhVF2KPGbv1QSxGAYrw=+dy1ei94aUgSB4tzFt5w@mail.gmail.com> (raw)
In-Reply-To: <4E47A649-B0B3-45EF-A125-3C36F8BFA901@stien.de>
Hi Malte,
On 31 March 2013 11:53, Malte Stien <malte@stien.de> wrote:
> \definehead[foosection][section]
> \setuphead[foosection][number=yes, ownnumber=yes, sectionsegments=section]
> However, I need them to show up in the table of content. What's the trick?
This is the trick:
\definecombinedlist[content][chapter,section,foosection,barsection,...]
The Table of Contents uses ConTeXt's combinedlist mechanism; to alter
the Table of Contents, redefine the list. (You have to redefine it;
\setupcombinedlist[content] alters how the list functions, but not
what goes into it.)
Useful wiki pages:
http://wiki.contextgarden.net/Titles (which is where I found the
\definecombinedlist trick)
http://wiki.contextgarden.net/Command/definecombinedlist (which
actually goes into lists and what they do)
In case you're curious: this is how the TOC is defined in strc-def.mkiv.
\definecombinedlist
[\v!content]
[\v!part,
\v!chapter,
\v!section,
\v!subsection,
\v!subsubsection,
\v!subsubsubsection,
\v!subsubsubsubsection]
[\c!level=\v!subsubsubsubsection,
\c!criterium=\v!local]
Hope this helps!
Cheers,
Sietse
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2013-03-31 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-31 9:53 Malte Stien
2013-03-31 11:30 ` Sietse Brouwer [this message]
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='CAF=dkzxgGXmhVF2KPGbv1QSxGAYrw=+dy1ei94aUgSB4tzFt5w@mail.gmail.com' \
--to=sbbrouwer@gmail.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).