How to make a white number inside a black circle (the picture below)? I want to change numbers inside the black circle, of course. I use Share LaTeX. I have read some articles here but anyone are not what I would like to get. I would like to get this an article (the picture below) - the sixth answer.

Thanks for help.

enter image description here

  • 1
    Stating the number of an answer is completely useless, there are at least 3 different orders they can be displayed in - sorted by age, activity or number of votes. Jun 14, 2017 at 13:48

2 Answers 2


Created from this answer linked in the question above.

            \node[shape=circle,fill,inner sep=2pt] (char) {\textcolor{white}{#1}};}}

  • @P. Siehr: Wouldn't it be a better way to just post a comment on the link to the (already) existing answer instead of just copying it? Jun 14, 2017 at 13:55
  • @CampanIgnis That might have been better, yes. The problem is, I lack the reputation to create comments ...
    – P. Siehr
    Jun 14, 2017 at 14:06

In what context do you want to use the numbers?

This does work in many situations. Observe that the color of the number and the circle are chosen automatically.

\newcommand{\ballnumber}[1]{\tikz[baseline=(myanchor.base)] \node[circle,fill=.,inner sep=1pt] (myanchor) {\color{-.}\bfseries\footnotesize #1};}

Earum excepturi inventore necessitatibus aliquid reiciendis enim.  \ballnumber{37} Earum excepturi inventore necessitatibus aliquid reiciendis enim.

enter image description here

Edit:The question Good way to make \textcircled numbers? is related.

The package https://ctan.org/pkg/circledtext is an alternative.

  • I want to use it as a symbol next to a text in the line. Jun 14, 2017 at 13:37
  • @ĽubomírMasarovič You mean as a symbol inline or like on the margin? Jun 14, 2017 at 13:43
  • Can you change size a bit, please. It is still too much large. Thanks. Jun 14, 2017 at 13:43
  • @ĽubomírMasarovič You can change the size yourself with font=\tiny or font=\footnotesize in the node options.
    – Huang_d
    Jun 14, 2017 at 13:43
  • @ĽubomírMasarovič: You are very welcome. Jun 14, 2017 at 13:46

Not the answer you're looking for? Browse other questions tagged .