Hi,
I used red frame which is in the metafun manual for long time.
But it is not working now.
Here is a MWE and a part of the log file.
What should I change in the definitions?
I am using "ConTeXt ver: 2021.07.10 21:51 LMTX fmt: 2021.7.12 int: english/english”.
%%%%%%%% framed Text with title %%%
\startuseMPgraphic{redFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FrameText}) ;
o := BodyFontSize ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
%fill b withcolor .85white ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ; %.425green;%.
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[rFrame][\useMPgraphic{redFrame}]
\defineframedtext[rfText]
[frame=off,
background=rFrame,
offset=\bodyfontsize,
width=\textwidth,
before=\blank,
after=\blank]
\def\StartFrame{\blank\startrfText}
\def\StopFrame {\stoprfText\blank}
\starttext
\StartFrame
This is a test for the frame.
This is a test for the frame.
This is a test for the frame.
This is a test for the frame.
This is a test for the frame.
This is a test for the frame.
\StopFrame
\stoptext
\starttext
log file:
fonts > 'fallback modern-designsize rm 12pt' is loaded
tex error > tex error on line 41 in file /Users/graph/Library/Mobile Documents/com~apple~CloudDocs/texMain/test.tex: Use of \meta_usempgraphic_nop doesn't match its definition
<to be read again>
}
<macro> \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\dimex
<macro> \pack_framed_process_background_indeed_internal #1->\bgroup \setbox \b_framed_extra \hpack \bgroup \ifzeropt \framedbackgroundoffset \else \kern -\framedbackgroundoffset \fi \hbox \bgroup #1
\egroup \egroup \wd \b_framed_extra \zeropoint \ht \b_framed_extra \framedbackgroundheight \dp \b_framed_ext
<macro> \m_framed_background ...background \endcsname \expandafter \pack_framed_process_background_indeed_internal \lastnamedcs \orelse \ifcsname \??overlay \m_framed_background \endcsname \expandafter \pack_framed_process_background_indeed_external \lastnamedcs
\fi
<macro> \pack_framed_process_backgrounds #1,#2->\edef \m_framed_background {#1}\ifx \m_framed_background \s!unknown \else \pack_framed_process_background
\expandafter \pack_framed_process_backgrounds \fi #2
<macro> \p_framed_component ...s\let \foregroundbox \pack_framed_background_box_content \hpack \layoutcomponentboxattribute to \framedbackgroundwidth \bgroup \the \everybackgroundbox \expandafter \pack_framed_process_backgrounds \p_framed_background ,\s!unknown
,\relax \box ...
...