[NTG-context] overlay problem (beta 31.12.2019)

Hans Hagen j.hagen at xs4all.nl
Thu Jan 2 19:07:37 CET 2020


On 1/2/2020 5:00 PM, Peter Rolf wrote:
> Hi Hans
> 
> There is a small problem with overlays.
> 
> %-----
> \starttext
> \defineoverlay[foo][{\blackrule[color=black,width=20mm,height=20mm]}]%
> \framed[background=foo,strut=no,offset=overlay]%{\blackrule[color=white,width=16mm,height=16mm]}
> \stoptext
> %-----

put this in cont-new.mkiv :

\ifcase\contextlmtxmode \else

\unexpanded\def\executedefinedoverlay#1#2%
   {\bgroup
    \setlayoutcomponentattribute{\v!overlay:#1}%
    \setbox\scratchbox\hbox 
\layoutcomponentboxattribute{\the\everyoverlay#2}%
 
\boxxoffset\scratchbox-.5\dimexpr\wd\scratchbox-\d_framed_target_wd\relax
 
\boxyoffset\scratchbox-.5\dimexpr\ht\scratchbox-\d_framed_target_ht+\d_framed_target_dp\relax
    \wd\scratchbox\d_framed_target_wd
    \ht\scratchbox\d_framed_target_ht
    \dp\scratchbox\d_framed_target_dp
    \box\scratchbox
    \egroup}

\fi

no updates today and tomorrow

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list