Difference between revisions of "Command/setupbackgrounds"
< Command
Jump to navigation
Jump to search
m (Text replace - "\[\[cmd:(.*)\|(.*)\]\]" to "{{cmd|$1}}") |
m (Better description, example.) |
||
Line 26: | Line 26: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
== Description == | == Description == | ||
+ | <code>\setupbackgrounds</code> is used to draw frames or backgrounds that cover specific areas of the page, under the text layer. It is especially used in combination with the | ||
+ | The first parameter sets the main layout area; the optional second one specifies the linked subarea(s) of the prior. Not all main areas have such subareas. | ||
− | + | Because {{cmd|showframe}} and <code>\setupbackgrounds</code> both draw frameboxes over parts of the page, the order in which they are invoked matters. In most cases, <code>\setupbackgrounds</code> should come last. | |
− | + | == Example == | |
− | + | <context source=yes> | |
+ | \setuppapersize[A10] | ||
+ | \showframe | ||
− | + | % \setupbackgrounds should be placed *after* \showframe, | |
− | + | \setupbackgrounds[footer] [background=color, backgroundcolor=blue] | |
− | + | \setupbackgrounds[footer] [leftmargin] [background=color, backgroundcolor=red] | |
− | \setupbackgrounds[ | ||
− | \setupbackgrounds[ | ||
− | |||
− | + | \setupbackgrounds[text] [background=color, backgroundcolor=lightgray] | |
+ | \setupbackgrounds[text] [rightmargin] [background=color, backgroundcolor=yellow] | ||
+ | I paint modern | ||
+ | </context> | ||
== See also == | == See also == | ||
− | + | * {{cmd|setupframed}}, which is the mechanism used by \setupbackgrounds. | |
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Revision as of 10:56, 8 June 2012
\setupbackgrounds
Syntax
\setupbackgrounds[...][...,...,...][...,...=...,...] | |
[...] | top header text footer bottom page paper leftpage rightpage |
[...,...,...] | leftedge leftmargin text rightmargin rightedge |
state | start stop repeat |
[...,...=...,...] | see \setupframed |
Description
\setupbackgrounds
is used to draw frames or backgrounds that cover specific areas of the page, under the text layer. It is especially used in combination with the
The first parameter sets the main layout area; the optional second one specifies the linked subarea(s) of the prior. Not all main areas have such subareas.
Because \showframe and \setupbackgrounds
both draw frameboxes over parts of the page, the order in which they are invoked matters. In most cases, \setupbackgrounds
should come last.
Example
\setuppapersize[A10] \showframe % \setupbackgrounds should be placed *after* \showframe, \setupbackgrounds[footer] [background=color, backgroundcolor=blue] \setupbackgrounds[footer] [leftmargin] [background=color, backgroundcolor=red] \setupbackgrounds[text] [background=color, backgroundcolor=lightgray] \setupbackgrounds[text] [rightmargin] [background=color, backgroundcolor=yellow] I paint modern
See also
- \setupframed, which is the mechanism used by \setupbackgrounds.
Help from ConTeXt-Mailinglist/Forum
All issues with: