I know that Framed
is used to show a frame around a symbol, how can I show a circle around a symbol?
If you don't mind having to micromanage the alignment parameters, you can overlay the empty circle character over a symbol:
TraditionalForm @ Style[
Overlay[{x, Style[\[EmptyCircle], 24]}, Alignment -> {0.075, 0.16}]
, "DisplayFormula"
]
The exhibited font size and alignment parameters work for the font on my machine, but you may have to tweak them for good results on your screen. And tweak them again for a decent print-out. The following Manipulate
can aid in that process:
Manipulate[
TraditionalForm @ Style[
Overlay[
{Style[x, xSize], Style[\[EmptyCircle], circleSize]}
, Alignment -> {xAlign, yAlign}
]
, "DisplayFormula"
]
, {{xSize, 12}, 8, 40, 1, Appearance -> "Labeled"}
, {{circleSize, 24}, 8, 40, 1, Appearance -> "Labeled"}
, {{xAlign, 0.075}, -1, 1, Appearance -> "Labeled"}
, {{yAlign, 0.016}, -1, 1, Appearance -> "Labeled"}
]
Here is an attempt to create a function that circles arbitrary expressions. It's rather clumsy, but I cannot think of a better way at the moment.
circled =
With[{m = Max@Rasterize[#,"RasterSize"]},
Framed[
Pane[#, {m, m}, Alignment -> Center],
RoundingRadius -> 1*^6]
] &;
circled[1/x + y + z]
Framed
can take an option RoundingRadius
.
Framed[expr, RoundingRadius -> radius]
At smaller values of radius
the corners of the frame are simply slightly rounded, but at larger values, the frame becomes an oval or circle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With