On Fri, 13 Jul 2007, Giuseppe Bilotta wrote:
Hello all,
Welcome back Giuseppe. I had benifitted a lot from your efforts of improving the math support in ConTeXt. Had it not been for the amsl module, I might have never switched to ConTeXt and would have missed a lot of fun.
I have a couple of questions concerning the use of layers in ConTeXt. I'm working with Luigi Scarso on a layout which is characterized by some fixed-position elements surrounding the actual main body of text.
For the fixed-position elements, I'm using layers. However, my ConTeXt is a little rusty[*], so there are a couple of things which I need hints for.
The first one is very simple: is there a way to 'fix' the layer's content "until they change"? I've currently set them as page backgrounds, but their content gets reset on each new page.
The second question is slightly more complex: is there a way to add contents to a layer, rather than replacing the current layer content? Something like a macro
\addtolayer[layername][hoffset=whatever(optional)]{additional content}
This is how I would do it. Not sure if this is the best way. Use tokens to keep track of the current information that should go to the layer, and repeat the layer on each page. \newtoks\testtoks \definelayer[test] [ width=\paperwidth, height=\paperheight, ] \startsetups make:test \setlayer[test][x=5cm,y=3cm]{\framed[align=normal,width=5cm]{\the\testtoks}} \stopsetups \setupbackgrounds[page][setups=make:test,background=test] \starttext \testtoks{This is a test} Let's see \page Now add something to the layer \input knuth \appendtoks \endgraf \input tufte \to \testtoks \page Let's start all over again \testtoks {Testing again} \stoptext HTH, Aditya