Hello everyone, I have defined my own set of heads with \setuphead like so, such that I can supply my own numbers: \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? Regards, Malte.
Hi Malte,
On 31 March 2013 11:53, Malte Stien
\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
participants (2)
-
Malte Stien
-
Sietse Brouwer