5

I need to place some \part titles within my document, but make them invisible in the text, and only appear within the table of contents and headers.

With this code, the \part titles are not found anywhere:

\setuphead[part][placehead=no, page=no, number=no]
\setupheadertexts[{\getmarking[part]}]
\starttext
    \part{Birds of South America}
\stoptext

By changing \placehead to equal "yes", the title is placed in the header and in the document:

\setuphead[part][placehead=yes, page=no, number=no]
\setupheadertexts[{\getmarking[part]}]
\starttext
    \part{Birds of South America}
\stoptext

How can I make \part invisible in the document, but visible in the table of contents and headers?

3

You need the empty setting for placehead:

\setuphead [part] [placehead=empty]
\setupheadertexts [part]
\starttext
  \completecontent
  \part{Birds of South America}
\stoptext

This does not place the part title on the page, but creates markings for the headers and an entry in the table of contents.

Furthermore, you don't need the \getmarking in \setupheadertexts. It is sufficient to just write part. ConTeXt knows that it's a valid mark and prints its value instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.