ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fw:  A question about layers
@ 2011-07-14 21:36 Marcin Borkowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2011-07-14 21:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I am sorry, Hans, I sent this (and the next message) to you instead of
to the list.  Here's a forward:

Dnia 2011-07-14, czw o godzinie 16:29 +0200, Hans Hagen pisze:
> On 14-7-2011 4:25, Marcin Borkowski wrote:
> > OK,
> >
> > after a pm from Mojca concerning my previous question I decided to
> > look into the "layers" mechanism.
> >
> > It won't work for me - just nothing shows up.
> >
> > What am I doing wrong?
> >
> > Here's a minimal example:
> >
> > \starttext
> > \definelayer[title][x=105mm,y=20mm]
> > \setlayer[title]{This is the title.}
> > \stoptext
> >
> > (I'd also like to be able to "anchor" the title so that
> > (105mm,20mm) are the coordinates of the center, not the lower-left
> > corner etc.  How to do that?)
> 
> \flushlayer[title]

Thanks too; but again, what does this do exactly?

(Sorry for asking dumb questions, but I'd like to understand the
underlying mechanism, not only learn how to use it...)

-- 
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fw:  A question about layers
  2011-07-16 17:35 ` Marcin Borkowski
  2011-07-16 21:15   ` Willi Egger
  2011-07-17  8:02   ` Wolfgang Schuster
@ 2011-07-17 17:07   ` Willi Egger
  2 siblings, 0 replies; 6+ messages in thread
From: Willi Egger @ 2011-07-17 17:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

In addition to my previous mail there is also an article published in the MAPS39 which shows an example of using layers.
You can download it from here : http://www.ntg.nl/maps/39/ (Willi Egger, Decorating CD-ROMs and DVDs (English), MAPS 39, 2009, 59-71)

Willi
On 16 Jul 2011, at 19:35, Marcin Borkowski wrote:

> Anybody help, please...?
> 
> Dnia 2011-07-14, o godz. 23:37:29
> Marcin Borkowski <mbork@wmi.amu.edu.pl> napisał(a):
> 
>> I think that the general problem is that I have a wrong conceptual
>> model of layers in ConTeXt.  You know, when I hear the word "layer",
>> I have some ideas about how it should/could/might work, and probably
>> these ideas are different than Hans'.  So I'm going to briefly
>> describe my idea (already modified by the answers) and please tell me
>> what's wrong with it.
>> 
>> So I imagine that \definelayer / \setuplayer defines a rectangular
>> shape on the page, possibly framed/colored/etc., which is going to
>> appear on all pages (default) or on selected ones.  The contents of
>> layers are set with \setlayer, (with some - mysterious for me -
>> "setups" trickery if they are going to change from page to page), and
>> they are actually put on the page by \setupbackgrounds.  (And I have
>> no idea what \flushlayer does in this conceptual framework.)  So
>> layers are actually kind of "beneath" ordinary page contents.
>> 
>> Some of these commands (which ones?) should moreover be placed before
>> \startext.
>> 
>> OK, so where am I right and where am I wrong now?
> 
> Best
> 
> -- 
> Marcin Borkowski
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fw:  A question about layers
  2011-07-16 17:35 ` Marcin Borkowski
  2011-07-16 21:15   ` Willi Egger
@ 2011-07-17  8:02   ` Wolfgang Schuster
  2011-07-17 17:07   ` Willi Egger
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2011-07-17  8:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.07.2011 um 19:35 schrieb Marcin Borkowski:

> Anybody help, please...?

Layers are objects which can be placed on any place of the page.

The difference between \setupbackgrounds and \flushlayer can be
seen in the example below. With \setupbackground the layer content
is put on the requested position (behind the text) after TeX has
finished the page. With \flushlayer ConTeXt starts a new page where
all collected layers are placed without any other text.

\definelayer[one]
\definelayer[two]

\setupbackgrounds[text][text][background=one]

\starttext

\input ward

\setlayer[one][x=3cm,y=3cm]{\tt One}

\page

\setlayer[two][x=3cm,y=3cm]{\tt Two}

\input ward

\flushlayer[two]

\input ward

\stoptext

As your plan is to make a document with layers only \flushlayer
is the better choice because you can do this:

\definelayer[content]

\definestartstop
  [PAGE]
  [after={\flushlayer[content]}]

\setuplayout[page]

\starttext

\startPAGE

\setlayer[content][x=3cm,y=4cm]{A}

\setlayerframed[content][x=7cm,y=2cm,frame=off,foregroundcolor=blue]{B}

\stopPAGE

\startPAGE

\setlayer[content][x=3cm,y=8cm]{\externalfigure[cow]}

\stopPAGE

\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fw:  A question about layers
  2011-07-16 17:35 ` Marcin Borkowski
@ 2011-07-16 21:15   ` Willi Egger
  2011-07-17  8:02   ` Wolfgang Schuster
  2011-07-17 17:07   ` Willi Egger
  2 siblings, 0 replies; 6+ messages in thread
From: Willi Egger @ 2011-07-16 21:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

the easiest way to get info is to read details.pdf and the new metafun-manual.

Willi
On 16 Jul 2011, at 19:35, Marcin Borkowski wrote:

> Anybody help, please...?
> 
> Dnia 2011-07-14, o godz. 23:37:29
> Marcin Borkowski <mbork@wmi.amu.edu.pl> napisał(a):
> 
>> I think that the general problem is that I have a wrong conceptual
>> model of layers in ConTeXt.  You know, when I hear the word "layer",
>> I have some ideas about how it should/could/might work, and probably
>> these ideas are different than Hans'.  So I'm going to briefly
>> describe my idea (already modified by the answers) and please tell me
>> what's wrong with it.
>> 
>> So I imagine that \definelayer / \setuplayer defines a rectangular
>> shape on the page, possibly framed/colored/etc., which is going to
>> appear on all pages (default) or on selected ones.  The contents of
>> layers are set with \setlayer, (with some - mysterious for me -
>> "setups" trickery if they are going to change from page to page), and
>> they are actually put on the page by \setupbackgrounds.  (And I have
>> no idea what \flushlayer does in this conceptual framework.)  So
>> layers are actually kind of "beneath" ordinary page contents.
>> 
>> Some of these commands (which ones?) should moreover be placed before
>> \startext.
>> 
>> OK, so where am I right and where am I wrong now?
> 
> Best
> 
> -- 
> Marcin Borkowski
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fw:  A question about layers
  2011-07-14 21:37 Marcin Borkowski
@ 2011-07-16 17:35 ` Marcin Borkowski
  2011-07-16 21:15   ` Willi Egger
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marcin Borkowski @ 2011-07-16 17:35 UTC (permalink / raw)
  To: ntg-context

Anybody help, please...?

Dnia 2011-07-14, o godz. 23:37:29
Marcin Borkowski <mbork@wmi.amu.edu.pl> napisał(a):

> I think that the general problem is that I have a wrong conceptual
> model of layers in ConTeXt.  You know, when I hear the word "layer",
> I have some ideas about how it should/could/might work, and probably
> these ideas are different than Hans'.  So I'm going to briefly
> describe my idea (already modified by the answers) and please tell me
> what's wrong with it.
> 
> So I imagine that \definelayer / \setuplayer defines a rectangular
> shape on the page, possibly framed/colored/etc., which is going to
> appear on all pages (default) or on selected ones.  The contents of
> layers are set with \setlayer, (with some - mysterious for me -
> "setups" trickery if they are going to change from page to page), and
> they are actually put on the page by \setupbackgrounds.  (And I have
> no idea what \flushlayer does in this conceptual framework.)  So
> layers are actually kind of "beneath" ordinary page contents.
> 
> Some of these commands (which ones?) should moreover be placed before
> \startext.
> 
> OK, so where am I right and where am I wrong now?

Best

-- 
Marcin Borkowski
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Fw:  A question about layers
@ 2011-07-14 21:37 Marcin Borkowski
  2011-07-16 17:35 ` Marcin Borkowski
  0 siblings, 1 reply; 6+ messages in thread
From: Marcin Borkowski @ 2011-07-14 21:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

And the second message accidentally sent to Hans:

Dnia 2011-07-14, czw o godzinie 16:29 +0200, Hans Hagen pisze:
> On 14-7-2011 4:25, Marcin Borkowski wrote:
> > OK,
> >
> > after a pm from Mojca concerning my previous question I decided to
> > look into the "layers" mechanism.
> >
> > It won't work for me - just nothing shows up.
> >
> > What am I doing wrong?
> >
> > Here's a minimal example:
> >
> > \starttext
> > \definelayer[title][x=105mm,y=20mm]
> > \setlayer[title]{This is the title.}
> > \stoptext
> >
> > (I'd also like to be able to "anchor" the title so that
> > (105mm,20mm) are the coordinates of the center, not the lower-left
> > corner etc.  How to do that?)
> 
> \flushlayer[title]
> 
> etc (some styles in the distributions have examples)

I think that the general problem is that I have a wrong conceptual model
of layers in ConTeXt.  You know, when I hear the word "layer", I have
some ideas about how it should/could/might work, and probably these
ideas are different than Hans'.  So I'm going to briefly describe my
idea (already modified by the answers) and please tell me what's wrong
with it.

So I imagine that \definelayer / \setuplayer defines a rectangular shape
on the page, possibly framed/colored/etc., which is going to appear on
all pages (default) or on selected ones.  The contents of layers are set
with \setlayer, (with some - mysterious for me - "setups" trickery if
they are going to change from page to page), and they are actually put
on the page by \setupbackgrounds.  (And I have no idea what \flushlayer
does in this conceptual framework.)  So layers are actually kind of
"beneath" ordinary page contents.

Some of these commands (which ones?) should moreover be placed before
\startext.

OK, so where am I right and where am I wrong now?


-- 
Marcin Borkowski
http://mbork.pl


-- 
Marcin Borkowski
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-17 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 21:36 Fw: A question about layers Marcin Borkowski
2011-07-14 21:37 Marcin Borkowski
2011-07-16 17:35 ` Marcin Borkowski
2011-07-16 21:15   ` Willi Egger
2011-07-17  8:02   ` Wolfgang Schuster
2011-07-17 17:07   ` Willi Egger

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).