2

How can I place the chapter titles in the header, but only on the first page of that chapter? This is the opposite of the question, How to prevent chapter titles from appearing in the header on the first page of each chapter in ConTeXt?, in other words, the header only displays the title on the first page, not on the other pages.

Village
  • 13,603
  • 23
  • 116
  • 219

1 Answers1

2

Just like your problem, the solution is the inverse of the post you linked to: define a header text and apply it to the structural (chapter), but leave the header empty for the rest.

Example:

\definetext [chapter:header:text] [header]
  [{\namedstructurevariable{chapter}{title}
    \hfill
    (this goes on the first page exclusively)}]

\setuphead [chapter] [header=chapter:header:text]

\setuppagenumbering [location=footer]

\starttext
  \startchapter[title=foo]
    \dorecurse{3}{\input knuth\page}
  \stopchapter
  \startchapter[title=bar]
    \dorecurse{3}{\input knuth\page}
  \stopchapter
\stoptext