On Sat, 12 Jan 2013 19:11:47 +0100, Wolfgang Schuster 
<wolfgang.schus...@gmail.com> wrote:

Move \definelayer and \setupbackgrounds *before* \startTEXpage because the 
environment creates a local group and you background setup is lost.

... Thanks for the hint - here's my next trial.

It should write "BEFORE" to tho top right corner of the page.

----
\setupbodyfont[30pt]

\starttext
  A

  \bgroup
    \definelayer[beforetext][width=\paperwidth,preset=righttop]

    \setupbackgrounds
      [page]
      [background={foreground,beforetext}]

    \startTEXpage
      \setlayer[beforetext]{\framed[width=2in]{BEFORE}}
      \externalfigure[cow][width=30cm]
    \stopTEXpage
  \egroup

  Z
\stoptext
----

The problem now is the layer "beforetext" has width of the page in the moment 
is is defined - 21 cm.

But the layer is supposed to be used later inside \start/stop-TEXpage whose 
page size may be arbitrary, or better, the size will result from the content it 
will contain.

In my example - an image of 30 cm width is to define the page size.

And the text "BEFORE" is not put to the top right corner of the (30 cm) page 
(what I'd like to achieve) but to cca 2 thirds of these 30 cm (given by \pagewidth which 
was 21 cm at the moment of definition).

I would probably need a way to alter the layer size to the current content...

Or any other way to place something to the top right corner of the page from 
within \start/stop-TEXpage, where page size is not known in advance?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.      [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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

Reply via email to