Difference between revisions of "Command/setupheader"

From Wiki
Jump to navigation Jump to search
m
Line 56: Line 56:
  
 
== Description ==  
 
== Description ==  
 +
The first argument is assumed to be "text" when it is left out.  Text sets the position of the header and/or footer directly over or under the pagebody.
 +
 
The different <tt>state</tt>s and their effects:
 
The different <tt>state</tt>s and their effects:
 
{|
 
{|
Line 68: Line 70:
 
|-
 
|-
 
|<tt>high</tt>
 
|<tt>high</tt>
|no heading on the first chapter page + expand textarea about space occupied by heading.  Strangely this also affects the footer in that it allows the text to lap into the footer area as well.  I don't quite understand why this happens.
+
|no heading on the first chapter page + expand textarea about space occupied by heading.
 
|-
 
|-
 
|<tt>text</tt>
 
|<tt>text</tt>
Line 82: Line 84:
 
|}
 
|}
  
 +
Note that when setting the state, before or after each applies to all parts of the page and it is therefore best set these by themselves as the first example below shows. For this reason state=high also affects the footer in that it allows the text to lap into the footer area as well.
  
 
== Example ==
 
== Example ==
<!-- Please fill in an example if you can -->
+
<texcode>\setupheader[state=empty]</texcode>
 +
<texcode>\setupheader[strut=yes,style=bold]</texcode>
 +
<texcode>\setupheader[text][after=\vskip 4pt \hrule]</texcode>
  
 
== See also ==
 
== See also ==

Revision as of 18:26, 22 November 2013

\setupheader

Syntax

\setupheader[...][...,...=...,...]
[...] text margin edge
state normal stop start empty high none nomarking name
strut yes no
style normal bold slanted boldslanted type cap small... command
leftstyle normal bold slanted boldslanted type cap small... command
rightstyle normal bold slanted boldslanted type cap small... command
leftwidth dimension
Limit the text inside the header to a certain dimension. Setting this value may interfere with any additional \delimitatetext or \doboundtext performed inside the headers
rightwidth dimension
before command
after command


Description

The first argument is assumed to be "text" when it is left out. Text sets the position of the header and/or footer directly over or under the pagebody.

The different states and their effects:

start, stop switch headings on and off
none switch off for whole chapter
empty no heading on the first chapter page
high no heading on the first chapter page + expand textarea about space occupied by heading.
text some 'text' defined by
\definetext[text][footer][pagenumber]

or

\definetext[text][footer][left][right]

which is valid on the first chapter page

Note that when setting the state, before or after each applies to all parts of the page and it is therefore best set these by themselves as the first example below shows. For this reason state=high also affects the footer in that it allows the text to lap into the footer area as well.

Example

\setupheader[state=empty]
\setupheader[strut=yes,style=bold]
\setupheader[text][after=\vskip 4pt \hrule]

See also

\setupheadertexts

Help from ConTeXt-Mailinglist/Forum

All issues with: