Hi Malte,

On 31 March 2013 11:53, Malte Stien <[email protected]> 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 : [email protected] / 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
___________________________________________________________________________________

Reply via email to