Changes

Jump to navigation Jump to search
869 bytes added ,  22:29, 30 January 2005
no edit summary
Headers with centered content
ConTeXt offers the possibility to have mirrored headers (for odd and even pages); content can be in two parts, at the inner and outer margin of each page. But how do you get a header that will have one part of its content centered and one part in the outer margin? (This is a common setup for books: chapter title centered, page number in outer margin.) Hans posted this solution to the list:
 
<texcode>
\setuppagenumbering[alternative=doublesided]
 
\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
 
</texcode>
 
The use of the TeX primitive rlap and llap allows centering of content.
gardener
111

edits

Navigation menu