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.

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
  • It may be better to use \getmarking[chapter] instead of chapter title. That way a use can change the chapter markibg if needed. – Aditya Jun 20 '13 at 11:57
  • @Aditya have you tested that? I got an error with \getmarking. – Philipp Gesang Jun 20 '13 at 12:13
  • I did not test it. But if you get an error, then that is a bug. – Aditya Jun 20 '13 at 13:37

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.