![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Kip Warner schrieb am 27.05.2024 um 19:23:
On Mon, 2024-05-27 at 05:43 -0400, seyal zavira wrote:
if you don't want to use metapost you can also use svg for background for example:
\startuniqueMPgraphic{centered_svg} draw lmt_svg [ filename = "badge.svg", width = OverlayWidth, y = OverlayHeight/2, ] ; \stopuniqueMPgraphic
\defineoverlay [svgback] [\useMPgraphic{centered_svg}]
\defineframed[Sback][location=low,background=svgback,frame=off,offset=8pt]
\starttext this is a sample \Sback{1} text \stoptext
Hello Seyal,
This does work but it's a bit annoying that I have to create an SVG of just a circle and store it somewhere. I'm fine with using MetaPost, especially if it makes this easier, but I just don't know how.
You can use the \framed solution and modify it to use a metapost graphic as background, it also easy to replace the circle with a hexagon etc. \startuseMPgraphic{textcircle} draw fullcircle xscaled OverlayWidth yscaled OverlayWidth withcolor OverlayLineColor ; \stopuseMPgraphic \defineoverlay[textcircle][\useMPgraphic{textcircle}] \defineframed [textcircled] [ width=1.5em, height=1.5em, frame=off, background=textcircle, location=low, offset=none] \starttext \dostepwiserecurse{0}{9}{1}{#1 = \textcircled{#1}\blank} \stoptext Wolfgang