Open main menu

Changes

1,288 bytes added ,  16:08, 12 November 2019
no edit summary
<!-- please remove this and the following line if you have checked this page -->
{{Reference_Cleanup}}
{{Reference
|name=setupheader
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setupheader</syntax>
== [[Help:Reference|Syntax]] ==
 
<syntax>setupheader</syntax>
 
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:state|state]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:stop|stop]] [[Reference/enCommand/value:start|start]] [[Reference/enCommand/value:empty|empty]] [[Reference/enCommand/value:high|high]] [[Reference/enCommand/value:none|none]] [[Reference/enCommand/value:nomarking|nomarking]] [[Reference/enCommand/value:name|name]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:strut|strut]]</td> <td>[[Reference/enCommand/value:yes|yes]] [[Reference/enCommand/value:no|no]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:style|style]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small...|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:leftstyle|leftstyle]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small...|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:rightstyle|rightstyle]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small...|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:leftwidth|leftwidth]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] <br /><!-- -->Limit the text inside the header to a certain dimension. <!-- -->Setting this value may interfere with any additional {{cmd|delimitatetext}} or {{cmd|doboundtext}} performed inside the headers </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:rightwidth|rightwidth]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:before|before]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[[Reference/enCommand/keyword:after|after]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
</table>
== Description ==
<pre>State:-- start, stop: switch headings on, off-- none: switch off for whole chapter-- empty: no heading on The first argument is assumed to be "text" when it is left out. Text sets the first chapter page-- high: no heading on position of the first chapter page + expand textarea about space occupied by heading-- text: some 'text' defined by \definetext[text][header and/or footer][pagenumber] directly over or \definetext[text][footer][left][right] which is valid on under the pagebody. Margin places the content in the margin of the first chapter page</pre>document.
The different <tt>state</tt>s and their effects:
{|
|<tt>start</tt>, <tt>stop</tt>
|switch headings on and off
|-
|<tt>none</tt>
|switch off for whole chapter
|-
|<tt>empty</tt>
|no heading on the first chapter page
|-
|<tt>high</tt>
|no heading on the first chapter page + expand textarea about space occupied by heading.
|-
|<tt>text</tt>
|some 'text' defined by
<texcode>
\definetext[text][footer][pagenumber]
</texcode>
or
<texcode>
\definetext[text][footer][left][right]
</texcode>
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 to set these by themselves as the first example below shows. For this reason state=high also affects the footer in that it removes the footer leaving no whitespace.
== Example Examples ==<!-- 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> === Header with thin line below === This is how to define header with thin line below, which does not appear on empty/blank page: <context mode=mkiv source=yes>\setupheader [text] [before={\startframed[frame=off,bottomframe=on,framecolor=blue,]}, after={\stopframed}, ]\setupheadertexts[Text left][Text right] \starttext Page 1 \page[empty,blank] Page 2\stoptext</context>
== See also ==
<!-- something like [[{{cmd:goto|\goto]] }} -->* {{cmd|setuplayouttext}}* {{cmd|setupheadertexts}}* {{cmd|setupfooter}}* {{cmd|setupfootertexts}} == Help from ConTeXt-Mailinglist/Forum ==All issues with:{{Forum|{{SUBPAGENAME}}}}
[[Category:ReferenceCommand/enLayout|setupheader]]