Hi all, I have to prepare a scientific poster, and of cause using anything except TeX is below a real scientist's dignity. The main problem is that I have to arrange content rather freely on the page, without the regularity imposed by using tables or columns. Using layers for this purpose is probably best. I have started with something like: \definelayer[ModelingLayer] \setupbackgrounds[page][background=ModelingLayer] \setlayer[ModelingLayer][position=no,x=1cm,y=1cm]{% \framed{Whatever}} This seems to work well enough for my purposes. Or does anybody have a better idea? Then please let me know. My main at the moment is positioning. I would like to position one layer relative to another. Say for example, 'top left edge of layer x 2cm below and 3cm right of bottom center of layer y'. So, how can I access the necessary values, i.e. x, y, width, depth, height of a layer? Or is there an easier way to do this? Greetings, Eckhart
Eckhart Guthöhrlein wrote:
Hi all,
I have to prepare a scientific poster, and of cause using anything except TeX is below a real scientist's dignity. The main problem is that I have to arrange content rather freely on the page, without the regularity imposed by using tables or columns. Using layers for this purpose is probably best. I have started with something like:
\definelayer[ModelingLayer] \setupbackgrounds[page][background=ModelingLayer] \setlayer[ModelingLayer][position=no,x=1cm,y=1cm]{% \framed{Whatever}}
layers are ok for that, \starttext \useMPlibrary[dum] \setuppapersize [A1][A1] \setupcolors [state=start] \definelayer [page] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=page] \startstandardmakeup \startbuffer \input ward \stopbuffer \setlayerframed [page] [preset=lefttop] [align=normal, width=.25\paperwidth, frame=off] {\getbuffer} \setlayerframed [page] [offset=.2\paperwidth, preset=righttop] [width=.2\paperwidth, align=normal] {\getbuffer} \setlayerframed [page] [preset=middle] [offset=1cm] {\externalfigure[whatever][width=4cm,height=5cm]} \stopstandardmakeup \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
\setlayerframed is great - no need to define a layer for each piece of content. That was new to me. Now, to make sure that I have understood correctly by comparing code and output:
\setlayerframed [page] [preset=lefttop] [align=normal, width=.25\paperwidth, frame=off] {\getbuffer}
This will be placed with its top left corner at the top left edge of the page.
\setlayerframed [page] [offset=.2\paperwidth, preset=righttop] [width=.2\paperwidth, align=normal] {\getbuffer}
With the top right corner at the top right edge of the page, with an offset (both x and y) of 0.2\paperwidth.
\setlayerframed [page] [preset=middle] [offset=1cm] {\externalfigure[whatever][width=4cm,height=5cm]}
Centered on the page. Ok. But it doesn't solve my problem. What I want to do is: - Place X somewhere. - Place Y with its top left corner 2cm below bottom center point of X. (Or some other reference point among tl, t , tr, l, c, r, bl, b, br.) You see, I don't know exactly what goes into the layers and how big it is, but I want to place someting else exactly beneath it. Can this be done? -- Eckhart
Expressed differently: How can I ask for the x/y coordinates of an edge of a layer? That would help me a lot. -- Eckhart
participants (2)
-
Eckhart Guthöhrlein
-
Hans Hagen