%%%%%%%% 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
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 ...
...
<line 4.41> \StopFrame
31
32 \starttext
33
34 \StartFrame
35 This is a test for the frame.
36 This is a test for the frame.
37 This is a test for the frame.
38 This is a test for the frame.
39 This is a test for the frame.
40 This is a test for the frame.
41 >> \StopFrame
42
43 \stoptext
44
If you say, e.g., '\def\a1{...}', then you must always put '1' after '\a',
since control sequence names are made up of letters only. The macro here has not
been followed by the required stuff, so I'm ignoring it.
mtx-context | fatal error: return code: 256