Hi to all, In case of presentations sometimes one has to combine many figures in the page, maybe overlapping for some parts. Something very easy in powerpoint. What's the best technique? Taking a look at the wiki and ot "It's in the details" manual it seems that layers, which can be placed according to absolute positions, are the ConTeXt solution to the problem. Is it so? I was in fact considering to create a simple python GUI app to allow a visual control on position of figures on a page, outputting ConTeXt code to be copied and pasted. Thanks -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
andrea valle wrote:
indeed, layers put in overlays (there can be many layers on top of each others if you want to do even dirtier tricks, you can use streams and have multiple subpages make up a page (see m-streams)
----------------------------------------------------------------- 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 -----------------------------------------------------------------
(Thanks Hans) On 13 Oct 2006, at 00:00, Hans Hagen wrote:
indeed, layers put in overlays (there can be many layers on top of each others
Uhm, I don't think I understood. In wiki layers are, in some way, opposite to overlay. How do I put a layer in an overlay? Could you post an essential snippet?
if you want to do even dirtier tricks, you can use streams and have multiple subpages make up a page (see m-streams)
(I'll take a look) Thanks -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
Now, I tried with overlays and layers. That's fine. In any case, in a second approach I simply used \setlayer to fill repeatedly the same layer. The result seems to be the same. What's the difference? Is it safe to use the second approach? Then: changing layer dimension in \definelayer, I cannot see any differences in the output. Can anyone explain what it should happen? Thanks Best -a- Two examples follow: \setupcolors[state=start] % first approach \definelayer [layer1][] \definelayer [layer2][] \definelayer [layer3][] \setlayer [layer1] [x=.5\paperwidth, y=.5\paperheight] {\externalfigure[layTest][]} \setlayer [layer2] [x=.35\paperwidth, y=.45\paperheight] {\externalfigure[layTest][]} \setlayer [layer3] [x=.5\paperwidth, y=.5\paperheight] {\color[darkred]{ \bf This is a text}} \defineoverlay[overlay1][{\placelayer[layer1]}] \defineoverlay[overlay2][{\placelayer[layer2]}] \defineoverlay[overlay3][{\placelayer[layer3]}] % end of first % second approach \definelayer [layer1b][] % just one \setlayer [layer1b] [x=.5\paperwidth, y=.5\paperheight] {\externalfigure[layTest][]} \setlayer [layer1b] [x=.35\paperwidth, y=.45\paperheight] {\externalfigure[layTest][]} \setlayer [layer1b] [x=.5\paperwidth, y=.5\paperheight] {\color[darkred]{ \bf This is a text}} % end \starttext % using first \framed [height=\textheight,width=\textwidth,background={overlay1, overlay2, overlay3},align=right, frame=off] { % write if you need to } % using second \framed [height=\textheight,width=\textwidth,background=layer1b,align=right, frame=off] { % write if you need to } \stoptext
Hi Andrea, andrea valle wrote:
Using different layers, you can change the order of appearance (background={1,2,3}|{1,3,2},..) for the layer content. Using only one layer, all layer content is placed stack like; the printing order is then fixed by the appearance order in the document (last overprints prior).
I think the size is significant, if you use relative positioning (preset=bottomright and alike). Greetings, Peter
Hi Peter,
Ah, thanks, I see the point. In the posted example, I was mumbling about the reference Hans did about overlays+layers. As far as I saw, I think that the only solution to absolute positioning is \setupbackgrounds. As wiki says, \placelayer offsets to \text dimensions. Am I right? Best -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
andrea valle wrote:
\definelayer[blabla][width=20cm,height30cm] etc etc -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Example: \definelayer [layer2a][width=.15\paperwidth] \setlayer [layer2a] [x=.15\paperwidth, y=.5\paperheight] {\externalfigure[layTest][width=.75\paperwidth]} I was expecting to have the layTest figure cut after its width exceeds the layer's width. It seems that this is unrelevant, i.e. If I have instead of this: \definelayer [layer2a][width=.15\paperwidth] this: \definelayer [layer2a][width=.75\paperwidth] It's the same. So, I cannot understand what width means for layers, as changing it has no consequences (in my example). Best -a- On 13 Oct 2006, at 18:31, Hans Hagen wrote:
Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
andrea valle wrote:
extend your example with \clip[width=.15\paperwidth,height=<define one>,hoffset=0pt,voffset=0pt]{\externalfigure..} and you can see the difference.. (no picture in the smaller layer). As I already mentioned, the size is (only?) significant, if you change the default positioning (reference point). For example, you want to place something with an offset of 2cm to the right bottom corner of the layer. Therefore you need the exact width and height of the layer. All default positioning (relative to top left corner of the layer) doesn't care about the size, as there is no difference (no calculation is needed). I hope I have made myself clear. Greetings, Peter
participants (3)
-
andrea valle
-
Hans Hagen
-
Peter Rolf