Difference between revisions of "Command/setupheadertexts"
< Command
Jump to navigation
Jump to search
m (Added \setupfootertexts to See Also) |
m |
||
Line 46: | Line 46: | ||
'''Note:''' '''\setuppagenumbering[location=]''' supresses the default output (i.e. centered in header) of the page number on every page. | '''Note:''' '''\setuppagenumbering[location=]''' supresses the default output (i.e. centered in header) of the page number on every page. | ||
+ | |||
+ | === Multiline header === | ||
+ | |||
+ | <texcode> | ||
+ | \startsetups[headertext] | ||
+ | \startframed[frame=off,align=flushleft,width=fit] | ||
+ | abc\\ | ||
+ | def\\ | ||
+ | ghi\\ | ||
+ | jkl | ||
+ | \stopframed | ||
+ | \stopsetups | ||
+ | |||
+ | \setupheadertexts[\directsetup{headertext}] | ||
+ | |||
+ | \starttext | ||
+ | aaa | ||
+ | \stoptext | ||
+ | </texcode> | ||
+ | |||
+ | (The result is not shown as headers - here, on Wiki - are trimmed out from the produced .pdf, so there is nothing to show.) | ||
== See also == | == See also == |
Revision as of 10:05, 17 March 2015
\setupheadertexts
Syntax
\setupheadertexts[...][...][...][...] | |
[...] | text on the left handed side of odd pages |
[...] | text on the right handed side of odd pages |
[...] | text on the right handed side of even pages |
[...] | text on the left handed side of even pages |
Description
Place headers and footers with the commands \setupheadertexts and \setupfootertexts.
These commands take 4 arguments. The first is for the left handed side on odd pages, the second for the right handed side on odd pages, the third for the right handed side on even pages, and the fourth for the left handed side on even pages.
Example
This example produces the same header on odd and even pages.
\setupheadertexts [{\getmarking[chapter]}] [{page \pagenumber}] [{page \pagenumber}] [{\getmarking[chapter]}] \setuppagenumbering[location=]
Note: \setuppagenumbering[location=] supresses the default output (i.e. centered in header) of the page number on every page.
Multiline header
\startsetups[headertext] \startframed[frame=off,align=flushleft,width=fit] abc\\ def\\ ghi\\ jkl \stopframed \stopsetups \setupheadertexts[\directsetup{headertext}] \starttext aaa \stoptext
(The result is not shown as headers - here, on Wiki - are trimmed out from the produced .pdf, so there is nothing to show.)
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: