Circled numbers in text

Martin Tapankov asked on TeX.SX:

What is a good way to make circled numbers in text?

I’m trying to make some good-looking numbers in a circle, using the simple command:


However, the circle is misaligned vertically with the number, and look a bit sloppy:

circled numbers

Any suggestions how can I adjust the vertical alignment so that the numbers look more centered w.r.t to the circles? Or, if that’s not an option, what other ways to achieve the same results are possible?

I will use those only for numbers, and in very few places, so manual adjustment per glyph is an option.

I’m using pdfLaTeX with Computer Modern, if that matters.


Here’s a TikZ solution:

  \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
  Numbers aligned with the text:
  \circled{1} \circled{2} \circled{3} end.
circled numbers

It’s just a node. TikZ options are used to align the base line, to adjust the size and to get the circle shape. You’re free to choose further options regarding size or circle thickness (option thick). There’s more: for example you could even name the nodes by another argument to connect them by arrows later.

If one like to use it for an enumerated list, for example, it’s easy but has to be protected:

  \item First item
  \item Second item
  \item Third item
  \item Fourth item
circled numbers in enumerate environment
Stefan Kottwitz

13. December 2010 by stefan
Categories: Fonts and Symbols, Graphics, pgf/TikZ, Questions & Answers, TeX.SX, TikZ | 3 comments

Comments (3)

  1. Thank you very much for this solution! I’m currently improving a book which used a picture environment for this. After replacing the code with your TikZ-version it looks MUCH cleaner now.

  2. Thank you. The solution with tikz helped me greatly.

  3. Thanks – way better than the original \textcircled!

Leave a Reply

Required fields are marked *