On Friday 09 June 2006 15:33, Aditya Mahajan wrote:
> >> [email protected]
> >
> > 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:
\setupheadertexts
[\hfil chapter\hfil]
[][]
[\hfil\hbox to 20em{\stretched{\tfb\sc
Independent{}Publishing}}\hfil]
And if I put commands in the \setupheader statement then this
works:
\setupheader[text][before={\tfb\sc\hskip 1in}}]
but this has no effect:
\setupheader[text][before={\tfb\sc\hfil},after={\hfil}]
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:
\def\Chapter#1{\global\def\mychaptername{#1}\chapter{#1}}
...and use \mychaptername in my home grown header routine.
In fact I have done just that today:
\def\mychapter{}
\def\Chapter#1{\global\def\mychapter{\tfb\sc\hfil#1\hfil}\chapter#1}
I can probably even get stretching in there if I work at it.
I don't mind doing this kind of plain tex manipulation but it
still seems to me that Context should handle it somehow.
--
John Culleton
Books with answers to marketing and publishing questions:
http://wexfordpress.com/tex/shortlist.pdf
Book coaches, consultants and packagers:
http://wexfordpress.com/tex/packagers.pdf
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context