ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setup of headers
@ 2004-10-04 11:41 Thomas A.Schmitz
  2004-10-04 16:35 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas A.Schmitz @ 2004-10-04 11:41 UTC (permalink / raw)


Hi,

found an old thread in the list archives, Adam Warner and Hans, but 
there was no real conclusion. Can this be done in ConTeXt? I want the 
following setup for my headers: mirror doublesided, on the even pages 
pagenumber leftaligned, chaptertitle midaligned; odd pages sectiontitle 
midaligned, pagenumber rightaligned; like so:

9______chapter______   ||  ______section______10

If I am not completely mistaken, setupheadertexts takes either one 
argument (identical header fo all pages, midaligned) or two (identical 
header for all pages, rightaligned/leftaligned) or four (mirroring 
even/odd headers, rightaligned/leftaligned). I think what we need here 
would be for \setupheadertexts to accept SIX arguments:

\setupheadertexts[even left][even middle][even right][odd left][odd 
middle][odd right]

Or is there another way to do this, and I'm just too stupid to see it?

Best

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setup of headers
  2004-10-04 11:41 setup of headers Thomas A.Schmitz
@ 2004-10-04 16:35 ` Hans Hagen
  2004-10-04 17:43   ` Thomas A.Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2004-10-04 16:35 UTC (permalink / raw)


Thomas A.Schmitz wrote:
> Hi,
> 
> found an old thread in the list archives, Adam Warner and Hans, but 
> there was no real conclusion. Can this be done in ConTeXt? I want the 
> following setup for my headers: mirror doublesided, on the even pages 
> pagenumber leftaligned, chaptertitle midaligned; odd pages sectiontitle 
> midaligned, pagenumber rightaligned; like so:
> 
> 9______chapter______   ||  ______section______10
> 
> If I am not completely mistaken, setupheadertexts takes either one 
> argument (identical header fo all pages, midaligned) or two (identical 
> header for all pages, rightaligned/leftaligned) or four (mirroring 
> even/odd headers, rightaligned/leftaligned). I think what we need here 
> would be for \setupheadertexts to accept SIX arguments:
> 
> \setupheadertexts[even left][even middle][even right][odd left][odd 
> middle][odd right]

this is the readable way:

\showframe

\setuppagenumbering[alternative=doublesiddd]

\setupheadertexts[]
\setupheadertexts[\setups{text a}][][][\setups{text b}]

\startsetups[text a]
   \rlap{\pagenumber}
   \hfill
   \getmarking[chapter]
   \hfill
   \llap{whatever}
\stopsetups

\startsetups[text b]
   \rlap{whatever}
   \hfill
   \getmarking[section]
   \hfill
   \llap{\pagenumber}
\stopsetups

\starttext

\chapter{test chapter} \page \section{test section}

\stoptext

(it's up to you to submit it into the wiki)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setup of headers
  2004-10-04 16:35 ` Hans Hagen
@ 2004-10-04 17:43   ` Thomas A.Schmitz
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas A.Schmitz @ 2004-10-04 17:43 UTC (permalink / raw)


On Oct 4, 2004, at 6:35 PM, Hans Hagen wrote:

>
> this is the readable way:
>
> \showframe
>
> \setuppagenumbering[alternative=doublesiddd]
>
> \setupheadertexts[]
> \setupheadertexts[\setups{text a}][][][\setups{text b}]
>
> \startsetups[text a]
>   \rlap{\pagenumber}
>   \hfill
>   \getmarking[chapter]
>   \hfill
>   \llap{whatever}
> \stopsetups
>
> \startsetups[text b]
>   \rlap{whatever}
>   \hfill
>   \getmarking[section]
>   \hfill
>   \llap{\pagenumber}
> \stopsetups
>
> \starttext
>
> \chapter{test chapter} \page \section{test section}
>
> \stoptext
>
> (it's up to you to submit it into the wiki)
>
> Hans

Hans,

thanks a lot, works wonderfully! I'll see that I actually understand 
your code and will then submit it to the wiki.

Best

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-04 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-04 11:41 setup of headers Thomas A.Schmitz
2004-10-04 16:35 ` Hans Hagen
2004-10-04 17:43   ` Thomas A.Schmitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).