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.
Asked
Active
Viewed 340 times
1 Answers
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
Philipp Gesang
- 7,533
\getmarking[chapter]instead of chapter title. That way a use can change the chapter markibg if needed. – Aditya Jun 20 '13 at 11:57\getmarking. – Philipp Gesang Jun 20 '13 at 12:13