Changes

Jump to navigation Jump to search
124 bytes added ,  14:18, 25 April 2012
Make result of example visible
\setupbackgrounds[page][background=mybg]
</texcode>
This command makes the contents of the layer appear only once after the background is activated. If you want to repeat the contents of the layer on each page, use the option <code>repeat=yes</code> in the <{{cmd>|definelayer</cmd> }} command. Then the contents of the layer will be shown on every page. You can add to these contents by a new <{{cmd>|setlayer</cmd>}}[mybg] command. To clear the accumulated contents use <{{cmd>|resetlayer</cmd}}>[mybg]. To make the layer appear on each page, so that it can be populated with different content, set the option<code>state=repeat</code> in <{{cmd>|setupbackgrounds</cmd>}}.
Now you can test the whole thing:
<texcodecontext source=yes>\setuppapersize[A10][A9,landscape]\setuparranging[2UP] % two pages side by side\showframe % show entire pages 
\definelayer[mybg] % name of the layer
[x=0mm, y=0mm, % from upper left corner of paper
width=\paperwidth, height=\paperheight] , % let the layer cover the full paper ]
\setupbackgrounds[page][background=mybg]
\setlayer[mybg] % name of the layer
[hoffset=1cm0.2cm, voffset=1cm0.2cm] % placement (from upper left corner of the layer) {\framed[frame=on, width=3cm2cm, height=2cm1cm]{LAYER}} % the actual contents of the layer 
\starttext
\stoptext
</texcodecontext>

Navigation menu