I try to get number and name of the current chapter into my page header.

Unfortunately, ConTeXt (MkIV) disagrees with itself about what's "current" - if several chapters start on the same page, I get the name of the first and the number of the last one.

I know I can influence the name with the second parameter of \getmarking, but how do I get the *number* of the first chapter on this page?

(You can argue it doesn't make sense to start several chapters on one page, but it's the same with sections.)


\setupheadertexts[\setups{kapitel}]

\startsetups[kapitel]
  \framed[frame=off, bottomframe=on, width=\textwidth, strut=yes]{%
  \rlap{\headnumber[chapter]. \getmarking[chapter]}
  \hfill
  \strut
  \hfill
  \llap{\pagenumber}
  }
\stopsetups



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to