Hi John, Humble, if I understand your question correctly then for me the following works: \setupheadertexts[\hfill {\getmarking[section][last]}\hfill][pagenumber][pagenumber][\hfill Even page text\hfill] \setuppagenumbering[location=, alternative=doublesided] \starttext \dorecurse{20}{\input knuth\blank[1cm]} \stoptext I have to admit that there might something be broken. If I compile the sample I get the wrong sectionnumber in the header. i.e. the section number of the first section on the next page is given. If I use [first] instead of last, the first sectionnumber should be given, but in this sample still the section number of the first section of the following page is given. Hans may be you could have a look into this matter? - Or am I doing wrong things? Cheers Willi John R. Culleton wrote:
On Friday 09 June 2006 13:06, Aditya Mahajan wrote:
On Thu, 8 Jun 2006, Aditya Mahajan wrote:
On Thu, 8 Jun 2006, John R. Culleton wrote:
Here is a common situation. I need a doublesided layout so I can adjust the backspace. I want the header text on evens and odds centered over the text block. To simplify the issue let's say I want "left" on the evens and "right" on the odds. If I specify (per the manual) \setupheadertexts[text][left][right] then I get both words on both pages. If I use two extra sets of [] then I can get "left" on the left and "right" on the right but I cannot get them centered.
I am missing something obvious I am sure. Anyone have a firm grasp of the obvious? I don't.
If I understand you correctly, use \setupheadertexts[center]. If you want something in the left, center and right, then do
\setupheadertexts[left][right] \setupheadertexts[center]
I misread your mail. How about something like this
\def\setupextendedheadertexts{% \dosixtupleempty\dosetupextendedheadertexts}
\def\dosetupextendedheadertexts[#1][#2][#3][#4][#5][#6]{ \setupheadertexts[] %Empty the center headers \setupheadertexts %Odd page [{\rlap{#1}\hfill#2\hfill\llap{#3}}][] %Even page [][{\rlap{#4}\hfill#5\hfill\llap{#6}}]}
\setupextendedheadertexts[odd-left][odd-center][odd-right][even-left][even- center][even-right]
\starttext \dorecurse{10}{This is a test \page} \stoptext
This does not take care of "magic" texts like pagenumber, section, chapter. If you want that, you can try (careful with linebreaks)
\def\setupextendedheadertexts{% \dosixtupleempty\dosetupextendedheadertexts}
\def\dosetupextendedheadertexts[#1][#2][#3][#4][#5][#6]{ \setupheadertexts[] %Empty the center headers \setupheadertexts %Odd page [{\rlap{\domagic{#1}}\hfill\domagic{#2}\hfill\llap{\domagic{#3}}}][] %Even page [][{\rlap{\domagic{#4}}\hfill\domagic{#5}\hfill\llap{\domagic{#6}}}]}
\unprotect \def\domagic#1{% \convertargument#1\to\ascii \doifsomething\ascii{% \doifelsemarking\ascii {\getmarking[\ascii][\v!first]} {\ConvertConstantAfter\doifelse\v!pagenumber{#1} \@@plaatspaginanummer {\ConvertConstantAfter\doifelse\v!date{#1} {\currentdate} {#1{}{}{}}}}}} \protect
\setupextendedheadertexts[date][chapter][pagenumber][pagenumber][section][W hatever]
\starttext \dorecurse{4}{ \chapter{Chapter \recurselevel} \input tufte \endgraf \input tufte \endgraf \input tufte \endgraf \section{Section} \input knuth \input knuth \input knuth }
\stoptext
Aditya _______________________________________________ ntg-context mailing list 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.