Hide chapter titles in ConTeXt

chapterscontextsection-titles

I have a situation where I need to place \chapter{} on the page, without displaying the actual title.

(1) Some code is contains criterium=chapter and will be broken without knowing a new chapter has started.

(2) The table of contents and cross-references still need to know there is a new chapter.

(3) I simply need some of the chapter titles (not all) to be hidden.

\starttext

    \chapter[placehead=no]{This is a chapter title}

    \input knuth

\stoptext

I tried the above code, which I can't see why it won't work, because placehead=yes is used to make \part{} titles visible, but strangely it does not work, it still makes the title appear, but just messes up the formatting.

How can I place a new chapter, have that chapter's title still appear in the table of contents and be used in cross-references, without making a chapter title appear on the page?

Best Answer

Use placehead=hidden

\setuphead
   [chapter]
   [placehead=hidden]

\starttext

\completecontent

\startchapter[title=First chapter]

   \startsection[title=First section]
      Lorem ipsum \dots
   \stopsection

   \startsection[title=second section]
      Lorem ipsum \dots
   \stopsection

\stopchapter

\startchapter[title=Second chapter]

   \startsection[title=First section]
      Lorem ipsum \dots
   \stopsection

\stopchapter

\stoptext

enter image description here