ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] How to encircle text?
@ 2023-11-05  6:23 anton.chigurh
  2023-11-05 10:27 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: anton.chigurh @ 2023-11-05  6:23 UTC (permalink / raw)
  To: ntg-context

I want to use \bigcirc to encircle text.
Is there a way to do it.
Tia
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: How to encircle text?
  2023-11-05  6:23 [NTG-context] How to encircle text? anton.chigurh
@ 2023-11-05 10:27 ` Hans Hagen via ntg-context
  2023-11-05 11:59   ` anton.chigurh
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2023-11-05 10:27 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 11/5/2023 7:23 AM, anton.chigurh@mail.com wrote:
> I want to use \bigcirc to encircle text.
> Is there a way to do it.
if you're wiling to compensate for its depth:

\defineoverlay
   [BigCirc]
   [{\scale
       [width=\overlaywidth]
       {\setbox0\hpack{\bigcirc}\raise\dp0\box0}}]

\framed
   [background=BigCirc,
  % frame=off,
    width=3cm,
    height=3cm]
   {test}

but bigcirc isn't meant for that

\startusableMPgraphic{MetaCirc}
     draw fullcircle
         xyscaled 
(OverlayWidth-OverlayLineWidth,OverlayHeight-OverlayLineWidth)
         withpen pencircle scaled OverlayLineWidth
         withcolor OverlayColor ;
\stopusableMPgraphic

\defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}]

\framed
   [background=MetaCirc,
    backgroundcolor=red,
    frame=off,
    rulethickness=1pt]
   {test}

\framed
   [background=MetaCirc,
    backgroundcolor=blue,
    rulethickness=.5pt]
   {test}

is more flexibel in the end

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
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: How to encircle text?
  2023-11-05 10:27 ` [NTG-context] " Hans Hagen via ntg-context
@ 2023-11-05 11:59   ` anton.chigurh
  2023-11-05 12:14     ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: anton.chigurh @ 2023-11-05 11:59 UTC (permalink / raw)
  To: ntg-context

Wow!
This certainly is not the noobie version!
All I wanted was to put a circle around a letter
for emphasis.
Thanks though
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: How to encircle text?
  2023-11-05 11:59   ` anton.chigurh
@ 2023-11-05 12:14     ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-11-05 12:14 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 11/5/23 12:59, anton.chigurh@mail.com wrote:
> Wow!
> This certainly is not the noobie version!
> All I wanted was to put a circle around a letter
> for emphasis.

Anton,

it works as you intend:

  \starttext
  \startusableMPgraphic{MetaCirc}
       draw fullcircle
           xyscaled
  (OverlayWidth-OverlayLineWidth,OverlayHeight-OverlayLineWidth)
           withpen pencircle scaled OverlayLineWidth
           withcolor OverlayColor ;
  \stopusableMPgraphic

  \defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}]

  a\dontleavehmode\framed
     [background=MetaCirc,
      backgroundcolor=red,
      frame=off,
      location=bottom,
      rulethickness=1pt]
     {b}c
  \stoptext

Just in case it helps,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-05 12:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-05  6:23 [NTG-context] How to encircle text? anton.chigurh
2023-11-05 10:27 ` [NTG-context] " Hans Hagen via ntg-context
2023-11-05 11:59   ` anton.chigurh
2023-11-05 12:14     ` Pablo Rodriguez via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).