Changes

Jump to navigation Jump to search
1,154 bytes added ,  00:56, 26 August 2023
m
< [[Structurals]] |  == 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 macros {{cmd|rlap}} and {{cmd|llap}} allows centering of content. Note that {{cmd|pagenumber}} gets you the number prior to conversion; if you're using {{cmd|setupuserpagenumber}}[numberconversion=...] then you'll want to use {{cmd|userpagenumber}} instead.
== Using capitals ==
In the previous example, the chapter title and the section title were fetched with the macro {{cmd|getmarking}} which wraps around {{cmd|fetchmark}}.
You can replace {{cmd|uppercase}} by {{cmd|WORD}} and so on.
== Marginal headings and centered headings ==
The following file gives a way to achieve marginal and centered headings for doublesided documents. Experiment to achieve other effects!
<texcodecontext source="yes">
% output=pdf interface=en
\stoptext
</texcodecontext>
== Skipping headers or footers ==
You can suppress or bypass a header or footer on a chapter page like this:
The options for 'header=' and 'footer=' are none,empty,high,nomarking.
== Substituting a shorter lemma for a ''section'' header ==
Given a global setup such as
</texcode>
= Examples = == Nice classic design == <context source="yes"> \startsetups [footer:leftpage] \prefixedpagenumber \space \undepthed{\blackrule [ width=\linewidth, height=\strutht, depth=\dimexpr\footerheight+\bottomspace\relax, ]} \space \labeltext{chapter} \getmarking[chapternumber]\stopsetups \startsetups [footer:rightpage] \getmarking[chapter] \space \undepthed{\blackrule [ width=\linewidth, height=\strutht, depth=\dimexpr\footerheight+\bottomspace\relax, ]} \space \prefixedpagenumber\stopsetups \setuplabeltext [en] [chapter=Chapter] \setuphead [chapter] [bodypartlabel=] \setupfootertexts [] [\directsetup{footer:rightpage}] [\directsetup{footer:leftpage}] [] \setuppagenumbering [alternative=doublesided] \starttext \startchapter [title=First chapter] \dorecurse{10}{Getting started navbox\input knuth}\stopchapter \startchapter [title=Second chapter] \dorecurse{10}{\input knuth}\stopchapter \stoptext</context> = Further reading = * [[Page numbering in words]] [[Category:Basics]]
18

edits

Navigation menu