Monday, July 16, 2007 Aditya Mahajan wrote:
On Mon, 16 Jul 2007, Giuseppe Bilotta wrote:
Hello all,
is there a "secret power switch" to tell ConTeXt that a particular layer has different positioning depending on wether it's on a left or right page?
You can possible use setups and use \doifoddpageelse to set the layers. See
http://archive.contextgarden.net/thread/20061102.171506.2fa793e2.en.html
Thanks a lot. I don't know if using presets is actually going to reduce the coding, though. In the mean time, I've found that layers have a doublesided option. This apparently allows you to override the left/right settings of a layer, so I tried \definelayer[title][ x=\dimexpr\backspace+\wdall-\wdtit, y=\topspace, width=\wdtit, height=\httit, state=repeat, doublesided=true, ] \setuplayer[lefttitle][ x=\backspace, ] \definelayer[desc][ x=\backspace, y=\topspace, width=\wddesc, height=\htdesc, state=repeat, doublesided=true, ] \setuplayer[leftdesc][ x=\dimexpr\backspace+\wdall-\wddesc, ] \definelayer[figs][ x=\dimexpr\backspace+\wdall-\wdfig, y=\dimexpr\topspace+\makeupheight-\htfig, width=\wdfig, height=\htfig, ] \setuplayer[leftfigs][ x=\backspace, ] \setupbackgrounds[page][background={color,title,desc,figs},backgroundcolor=elux-ultralight] However, the 'main' setup is always used, the left one is never used. Am I doing something wrong? -- Giuseppe "Oblomov" Bilotta