I want to have a document with some chapters of frontmatter followed by a table of contents showing all subsequent chapters and endmatter but not the frontmatter

Best I have found is \completecontent[criterium=all] but that includes frontmatter

How would I best do this in Context and where is the best place to find such things out in the future?

Thanks

-

The simplest way is to replace the section with subject and the chapter with title. But that way you loose the numbering. I think that is desired in your case. If it's not, you have to define you own section heads with \definehead.

You can use tell the command \placelist to print only particular structure types. If you already use subject which should be included in the TOC you can easily create your own types based on the existing ones. That way you can retain the numbering.

Example:

\definehead
[NoListSubject]
[subject]

[NoListSection]
[section]

\starttext

\placelist [chapter, section]

\NoListSubject {Alpha}
\NoListSection {Beta}
\section {Gamma}
\subject {Delta}

\stoptext


The \definehead defines a custom structure type based on the second argument. The subject is unnumbered, the section is numbered.

\placelist [chapter, section] places only chapters and sections. The following prints all types:

\placelist
[chapter,
section,
NoListSubject,
NoListSection]


Just change the sectioning commands in the frontmatter to custom types and tell \placelist which you want to be printed.

-