On 6/7/2013 9:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
I'm trying to understand meaning of "location" and "corner" keywords of layer definition (http://wiki.contextgarden.net/Layers#My_first_Layer).
The goal is to place a logo (here: a \framed) to the top right corner of the page, with vertical and horizontal shift 5 mm into the centre of the page.
The working code is:
---- \definelayer [Logo] [location={left,bottom}, x=\paperwidth, y=0mm, hoffset=-5mm, voffset=5mm, ]
\setlayer [Logo] {\framed[width=4cm,height=1cm]{LOGO}}
\setupbackgrounds[page][background=Logo]
\starttext \input knuth \stoptext ----
Although it works, it's a result of many attempts. I don't understand why "location={left,bottom}" is the correct choice although the referential point of the logo is *right-top* corner and I'm placing the logo into the *right-top* corner of the layer (page).
I played with "corner=" and "location=" combinations but - it seems the only one which gives the good result is the one above.
Could anyone explain this?
see end of pack-box.mkiv for relationship between corner and location; it has to do with matching reference points of content and position on layer ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------