Difference between revisions of "Command/setupbackgrounds"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=setupbackgrounds
 
|name=setupbackgrounds
Line 6: Line 4:
 
}}
 
}}
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupbackgrounds</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
Line 20: Line 20:
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:state|state]]</td>
+
     <td class="cmd">[[Command/keyword:state|state]]</td>
     <td>[[Reference/en/value:start|start]] [[Reference/en/value:stop|stop]] [[Reference/en/value:repeat|repeat]] </td>
+
     <td>[[Command/value:start|start]] [[Command/value:stop|stop]] [[Command/value:repeat|repeat]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
 
     <td class="cmd">[...,...=...,...]</td>
 
     <td class="cmd">[...,...=...,...]</td>
     <td>see [[Reference/en/setupframed|\setupframed]] </td>
+
     <td>see [[Command/setupframed|\setupframed]] </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
 
  
 
== Description ==  
 
== Description ==  
== comment ==
+
<code>\setupbackgrounds</code> is used to draw frames or backgrounds that cover specific areas of the page, under the text layer.
  
The first parameter sets the main layout area, the second one specifies the linked subarea(s) of the prior. Not all main areas have such subareas.
+
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
  
== Example ==
+
% \setupbackgrounds should be placed *after* \showframe,
  
'''[text]''' has several linked subareas.
+
\setupbackgrounds[footer] [background=color, backgroundcolor=blue]
<pre class="example">
+
\setupbackgrounds[footer] [leftmargin] [background=color, backgroundcolor=red]
\setupbackgrounds[text] [background=color,backgroundcolor=lightgray]
 
\setupbackgrounds[text] [leftmargin] [background=color,backgroundcolor=red]
 
</pre>
 
  
sets a light gray background for the text area and a red background for the left margin area.
+
\setupbackgrounds[text] [background=color, backgroundcolor=lightgray]
 +
\setupbackgrounds[text] [rightmargin] [background=color, backgroundcolor=yellow]
  
 +
I paint modern
 +
</context>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* {{cmd|setupframed}}, which is the mechanism used by \setupbackgrounds.
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Reference/en|setupbackgrounds]]
+
[[Category:Command/Backgrounds|setupbackgrounds]]

Revision as of 13:22, 13 October 2019

\setupbackgrounds

Syntax (autogenerated)

\setupbackgrounds[...,...][...,...][...=...,...]
[...,...]top header text footer bottom
[...,...]leftedge leftmargin text rightmargin rightedge
...=...,...inherits from \setupframed


\setupbackgrounds[...,...][...=...,...]
[...,...]paper page leftpage rightpage text hidden
statestart stop
...=...,...inherits from \setupframed


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.

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: