* setuphead and Table of Content
@ 2013-03-31 9:53 Malte Stien
2013-03-31 11:30 ` Sietse Brouwer
0 siblings, 1 reply; 2+ messages in thread
From: Malte Stien @ 2013-03-31 9:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
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.
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: setuphead and Table of Content
2013-03-31 9:53 setuphead and Table of Content Malte Stien
@ 2013-03-31 11:30 ` Sietse Brouwer
0 siblings, 0 replies; 2+ messages in thread
From: Sietse Brouwer @ 2013-03-31 11:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-31 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-31 9:53 setuphead and Table of Content Malte Stien
2013-03-31 11:30 ` Sietse Brouwer
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).