26. Juli 2016 um 20:21Hi Hans,
I think I was not very clear.
Title first framed : Hans
Title second framed : Hagen
width=max,ThanksFabrice
\setupbodyfont[pagella,11pt]
\setupcolors[state=start]
\defineframedtext
[MyFrame]
[before={\blank},
after={\blank},
frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
style=italic]
\setvariables
[text]
[text1=Hans,
text2=Hagen,]
\startuseMPgraphic{MyFrame}
path b;
picture p;
p := textext.rt("\white\getvariable{text}{text1}");
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);
b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth;
fill OverlayBox withcolor lightgray;
fill b withcolor darkred;
draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred;
draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startMyFrame
\input knuth
\stopMyFrame
\startMyFrame
\input knuth
\stopMyFrame