Am 31.05.2013 um 15:31 schrieb Thomas Friedrich
Hello,
I would like to put the \chapter and \section names, including their respected numbers, in the header of my document, in small script and separated from the main text by a horizontal line, the width of \textwidth. On uneven pages the chapter-names, on even pages the section names. Reading the manual (4.16 Headers and Footers), I thought this should work:
\setuppagenumbering[start=start,alternative=doublesided,location=] \setupheader[][style=small,after=\hrule] \setupheadertexts[section][pagenumber][pagenumber][chapter]
Problems: 1) the mark "chapter" does not work. The section title appears but not the chapter title. 2) The chapter-number and the section-number don't appear in the header. 3) \hrule draws a line from the very left to the very right of the page.
My Questions: i) What is the "mark-mechanism" that is mentioned in the manual (couldn't find any information about that). ii) Why does chapter not work? iii) \hrule is probably not the best command here?
I found the following somewhere in the web:
\setupheadertexts[{\tfx\fetchmark[section][first]}][][][{\tfx\fetchmark[chapter][current]}]
which gives me indeed the chapter-name. Why "current" instead of "first"? What do I have to add to get the numbers?
It does help when you can show us a minimal example for your document. Wolfgang