On Fri, 9 Jun 2006, John R. Culleton wrote:
On Friday 09 June 2006 15:33, Aditya Mahajan wrote:
ntg-context@ntg.nl
Very impressive, but surely there is a simpler solution! I just want one header on the left hand page, a different one on the right, and both of them centered on their respective pages.
\def\MyHeader{ \doifoddpageelse{Odd Header} {Even Header}}
\setupheadertexts[\MyHeader]
If you want you can extend it to recognize keywords like date, pagenumber, section etc.
Yes, I can do the above. Unfortunately the keywords like chapter lose their special meaning when enclosed in any way. For example \setupheadertexts [chapter] [][] [\hfil\hbox to 20em{\stretched{\tfb\sc Independent{}Publishing}}\hfil]
...works, but as soon as I place any command ahead of the keyword chapter it just becomes the word "chapter". for example this doesn't work: [code snipped]
You can use the \domagic macro from my previous email to handle chapter, date and pagenumber.
I can of course roll my own as you suggest above. But if I want chapter as a variable then I will have to encapsulate my \chapter command thus: [code snipped]
I don't mind doing this kind of plain tex manipulation but it still seems to me that Context should handle it somehow.
If you just want chapter markings, use \getmarking[chapter]. Aditya