On 8/17/2021 4:01 PM, Pablo Rodriguez via ntg-context wrote:
On 8/17/21 9:30 AM, Hans Hagen via ntg-context wrote:
On 8/17/2021 5:56 AM, Pablo Rodriguez via ntg-context wrote:
[...]
I don’t get the layer in the TEXpage.

How could I get it with the TEXpage dimensions?
only by first boxing (using framed or so) and then taking those dimensions

Many thanks for your reply, Hans.

I’m afraid I don’t know how to make the commands work:

   \setupexternalfigures[location=default]
   \definelayer[hi]
    [x=.5\dimexpr\framedwidth\relax, y=.5\dimexpr\framedheight\relax]
   \setupbackgrounds[page][background={foreground, hi}]
   \starttext
   \startTEXpage
   \framed[frame=off, offset=none]
   {\setlayer[hi]{\color[red]{hi}}
   \externalfigure[cow-brown]\framedheight}
   \stopTEXpage
   \stoptext

In this case, \getfiguredimensions would work, but I don’t know how to
deal with a pure text box.

BTW, is there a way to have TEXpages numbered? "pagestate=start" seems
not to work here.
for the wiki ...

\starttext

  \definelayer[hi]

  \startTEXpage[background=hi]
    \setbox\scratchbox\hbox\framed
      [frame=off,offset=none,align=middle]
      {\input{tufte}}%
    \setuplayer
      [hi]
      [width=\wd\scratchbox,height=\htdp\scratchbox]
    \setlayer
      [hi][preset=middle]
      {\color[green]{there}}
    \box\scratchbox
  \stopTEXpage

  \defineoverlay[hi]

  \startTEXpage[background=hi]
    \defineoverlay
      [hi]
      [{\framed

[frame=off,offset=overlay,width=\overlaywidth,height=\overlayheight]
          {\color[red]{there}}}]
    \framed
      [frame=off,offset=none,align=middle,background=hi]
      {\input{tufte}}%
  \stopTEXpage

\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to