Changes

Jump to navigation Jump to search
renewed from non-template page
<cd:commandgroup name="definetext" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->
The command <tt>\definetext</tt> is used to define the content of single layout areas.
</cd:shortdesc>
<cd:variants>
<cd:command category="layout" file="page-txt.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-texts.xml" level="style" name="definetext" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:keywords ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="top"></cd:constant>
<cd:constant type="header"></cd:constant>
<cd:constant type="text"></cd:constant>
<cd:constant type="footer"></cd:constant>
<cd:constant type="bottom"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="3">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="text"></cd:constant>
<cd:constant type="margin"></cd:constant>
<cd:constant type="edge"></cd:constant>
</cd:keywords>
<cd:keywords ordinal="4">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="date"></cd:constant>
<cd:constant type="pagenumber"></cd:constant>
<cd:constant type="cd:mark"></cd:constant>
<cd:constant type="cd:text"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="5">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="date"></cd:constant>
<cd:constant type="pagenumber"></cd:constant>
<cd:constant type="cd:mark"></cd:constant>
<cd:constant type="cd:text"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="6">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="date"></cd:constant>
<cd:constant type="pagenumber"></cd:constant>
<cd:constant type="cd:mark"></cd:constant>
<cd:constant type="cd:text"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="7">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="date"></cd:constant>
<cd:constant type="pagenumber"></cd:constant>
<cd:constant type="cd:mark"></cd:constant>
<cd:constant type="cd:text"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description></cd:description>
<cd:examples><cd:example title="Custom header on a chapter page">`\definetext` can be used to create a custom header for the first page of a `\chapter`.

The command has a variable number of arguments like {{cmd|setupheadertexts}}.

The third argument with the horizontal position can only be used if you use two or four arguments to set texts on the left and right side but isn’t in this example because a) the "text" position is the default and b) we pass only one argument for the content to have the text horizontally centered.

<texcode>
% Wolfgang Schuster, 2024-03-26
\definetext
[chapterheader] % identifier
[header] % vertical position (header/footer)
% [text] % horizontal position (text/margin)
[This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]
</texcode></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="setuptext" originator="system"></cd:commandref>
<cd:source file="page-txt.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Layout"></cd:wikipage>
<cd:commandref name="setuphead"></cd:commandref>
<cd:commandref name="setupheadertexts"></cd:commandref>
<cd:wikipage page="Layout"></cd:wikipage></cd:seealso>
</cd:commandgroup>

Navigation menu