4

I would like to know how make a circle and then insert text. There has to be a way.. right?

David Carlisle
  • 757,742
  • The easier mode is to use node within tikz. But you have to explain better what you want, where you wish to use it, etc... – Sigur Feb 19 '15 at 13:13
  • @Sigur What is that? Im new to this so I just wanted to know if it was possible. – Joel Rodriguez Feb 19 '15 at 13:15
  • OK, it is possible. See here: http://www.texample.net/tikz/examples/feature/nodes-and-shapes/ – Sigur Feb 19 '15 at 13:21
  • @Sigur note the OP has tagged this mathjax – David Carlisle Feb 19 '15 at 13:24
  • 4
    I'm voting to close this question as off-topic because it's about MathJax. – Gonzalo Medina Feb 19 '15 at 13:28
  • 3
    I don't think questions should be closed OT simply because they use the [tag:mathjax] tag. Otherwise why have it? It is phrased in general, and does have latex answers, some of which might apply to mathjax as well. – David Carlisle Feb 19 '15 at 13:37
  • @DavidCarlisle, I'm almost sure (or not) that OP tagged randomly. – Sigur Feb 19 '15 at 13:38
  • @Sigur if we ignore the tags then the question should definitely not be closed OT:-) – David Carlisle Feb 19 '15 at 13:39
  • @DavidCarlisle I don't know what that tag is doing here. MathJax questions are off-topic here. – Gonzalo Medina Feb 19 '15 at 13:43
  • @DavidCarlisle if it's about LaTeX then it's a duplicate: http://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers – Gonzalo Medina Feb 19 '15 at 13:46
  • @GonzaloMedina Pure mathjax questions are OT, as are pure emacs questions or pure environment variable setup questions, but questions involving overlap are possible and I think reasonable to answer. – David Carlisle Feb 19 '15 at 13:47
  • @GonzaloMedina arguably yes, although that is about numbers specifically (single character rather than arbitrary text) at least the question is, the answer is more general. – David Carlisle Feb 19 '15 at 13:49
  • FWIW The closest I've found in mathjax is \boxed{a}, I couldn't find a way to circle text in mathjax unfortunately (as of now \tikz doesn't work in mathjax) – polpetti Aug 31 '16 at 16:16
  • Related (and very rich): https://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers. – mcp Feb 24 '22 at 02:14

1 Answers1

8

Latex has a \textcircled command for making a fixed size circle around a letter \textcircled{R} and its picture mode has a \circle command for making circles in a range of sizes (or arbitrary size if you use pict2e).

You don't mention mathjax but I note you tagged the question mathjax. Mathjax specific questions are off topic, but I'll note that mathjax does not support either of the above commands but you can do

\enclose{circle}[mathcolor="red"]{\color{black}{x}}

If you use its enclose extension.

David Carlisle
  • 757,742
  • I think it looks better with downscaling the character, e.g. \textcircled{\scalebox{0.7}{3}} (tested in LaTeX only) – cknoll Nov 28 '19 at 09:21
  • @cknoll It does seem to need some alignment, but I don't think your command is correct. Can you give an example trying to encircle the letter 'M'? – mcp Feb 23 '22 at 18:37
  • Indeed. It seems to depend on the font. If I use \usepackage{lmodern} (for my preferred font) then \textcircled{\raisebox{0.14em}{\scalebox{0.5}{M}}} gives good results. It uses \raisebox to shift the glyph upwards. Note that \raisebox also accepts negative values for its first argument. – cknoll Feb 23 '22 at 18:49
  • When I do \textcircled{R} circle is kind of small, it is possible to make it larger ? – alper Jan 09 '23 at 10:40
  • {\large\textcircled{R}}? @alper – David Carlisle Jan 09 '23 at 11:13