Open main menu

Changes

* 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.
* about the third parameter ** the key <code>state</code> determines when the page background is recalculated. <ttcode>state=repeat</ttcode> ensures that the page background is always recalculated (useful if you want to use a variable that depends on the current page, such as its number with {{cmd|realpageno}}). <ttcode>state=stop</ttcode> and <ttcode>state=start</ttcode> stop and start recalculations.
Because {{cmd|showframe}} and {{cmd|setupbackgrounds}} both draw frameboxes over parts of the page, the order in which they are invoked matters. In most cases, {{cmd|setupbackgrounds}} should come last.
Backgrounds are essential for working with [[Layers]]. You enable your defined layers like <code>\setupbackgrounds[page][background=mylayer]</code>.
The <ttcode>background</ttcode> key also takes a list, and if you include "foreground", you can also set something on top of your general content, e.g. <code>\setupbackgrounds[page][background={mybacklayer,foreground,mytoplayer}]</code>.
== Example ==
999

edits