Changes

Jump to navigation Jump to search
687 bytes added ,  22:54, 17 August 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:
The use of the TeX primitive rlap and llap allows centering of content.
 
 
 
'''Using capitals'''
 
In the previous example, the chapter title and the section title were fetched with the macro <cmd>getmarking</cmd> which wraps around <cmd>fetchmark</cmd>.
However, in case you need a raw version of the mark, say for instance to put it uppercase, you may use this setup instead:
 
<texcode>
 
\startsetups[text a]
\rlap{\pagenumber}
\hfill
\expanded{\uppercase{\fetchmark[chapter][first}}
\hfill
\llap{whatever}
\stopsetups
 
\startsetups[text b]
\rlap{whatever}
\hfill
\expanded{\uppercase{\fetchmark[section][first}}
\hfill
\llap{\pagenumber}
\stopsetups
 
</texcode>
 
 
You can replace <cmd>uppercase</cmd> by <cmd>WORD</cmd> and so on.
Anonymous user

Navigation menu