ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: andrea valle <valle@di.unito.it>
Subject: Re: absolute positioning of figures
Date: Fri, 13 Oct 2006 16:33:28 +0200	[thread overview]
Message-ID: <eca64e0f817044c031d771baf1265138@di.unito.it> (raw)
In-Reply-To: <14d17b2f52b9fab4dfe14728d84889dc@di.unito.it>



> 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?

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

  reply	other threads:[~2006-10-13 14:33 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 [this message]
2006-10-13 15:54       ` Peter Rolf
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=eca64e0f817044c031d771baf1265138@di.unito.it \
    --to=valle@di.unito.it \
    --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).