Changes

Jump to navigation Jump to search
588 bytes added ,  07:22, 26 October 2011
Had to fight a bit to get My First Layer, so I added a clarifying example to that part of the page.
</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:
<texcode>
\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=1cm, voffset=1cm] % placement (from upper left corner of the layer)
{\framed[frame=on, width=3cm, height=2cm]{LAYER}} % the actual contents of the layer
 
 
\starttext
 
\dorecurse{2}{\page[empty]} % for testing, to get 2 pages, 1st with layer, 2nd without
 
\stoptext
 
</texcode>
 
==Placement==
102

edits

Navigation menu