ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
Subject: Re: absolute positioning of figures
Date: Fri, 13 Oct 2006 17:54:16 +0200	[thread overview]
Message-ID: <452FB6A8.7050303@gmx.net> (raw)
In-Reply-To: <eca64e0f817044c031d771baf1265138@di.unito.it>

Hi Andrea,

andrea valle wrote:
> 
>> 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
>>>
>>
> 
> 
> 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?
>
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).

> Then: changing layer dimension in \definelayer, I cannot see any 
> differences in the output.
> Can anyone explain what it should happen?

I think the size is significant, if you use relative positioning
(preset=bottomright and alike).

Greetings, Peter

> 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
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

  reply	other threads:[~2006-10-13 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 21:30 andrea valle
2006-10-12 22:00 ` Hans Hagen
2006-10-12 22:45   ` andrea valle
2006-10-13 14:33     ` andrea valle
2006-10-13 15:54       ` Peter Rolf [this message]
2006-10-13 16:22         ` andrea valle
2006-10-13 16:31           ` Hans Hagen
2006-10-13 16:56             ` andrea valle
2006-10-13 17:58               ` Peter Rolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452FB6A8.7050303@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).