Using pifont package and symbols from \ding{172}
to \ding{211}
you easily have very excellent circled numbers, but if you want circled numbers bigger than 10 we have a problem. As showed by other stackexchange users here, we can solve the problem if numbers are not too big, but things became hard (complex LaTeX codes) and we can have problems if we are writing inside a text (if the circle became big, LaTeX can be forced to enlarge space between lines, or maybe to overlap circle upon adjacent upper and lower lines): things are a bit simpler if we only want circled number in a itemize list. This lack in flexibility could be in some case bothersome. A reasonable solution seems to use the tcolorbox package: after attempts I found that we simply have to add in preamble this
\usepackage{tcolorbox} \newcommand{\ciao}[1]{{\setlength\fboxrule{0pt}\fbox{\tcbox[colframe=black,colback=white,shrink tight,boxrule=0.5pt,extrude by=1mm]{\small #1}}}}
and call in the document the command \ciao when we want a "circled" number (example: \ciao{12} will "circle" the number 12). By the way, the use of fbox in the preamble line is important because without it, rounded box could protrude out of the line on the left or on the right when they are at the margin of the line: this would be very unaesthetic.
Resuming, I see in this solution 3 pros and 1 cons:
- pros: simple code, good working inside a text too, flexibility (big numbers too & in case we can easily play with borders or colors: see 0.5pt or black&white in the preamble line).
- cons: we don't have circles but rounded box, but I find this a reasonable compromise.
An example of application of this method is
Quel ramo del lago di Como \ciao{1}, che volge a mezzogiorno, tra due catene \ciao{20} non interrotte di monti, tutto a seni e a golfi, a seconda dello sporgere e del rientrare di quelli, vien, quasi a un tratto, a restringersi, e a prender corso \ciao{252} e figura di fiume, tra un promontorio a destra, e un'ampia costiera dall'altra parte; \ciao{3432} e il ponte che ivi congiunge le due rive, par che renda ancor più sensibile all'occhio questa trasformazione, e segni il punto in cui il lago cessa, e l'Adda ricomincia, per ripigliar poi nome di lago dove le rive, allontanandosi di nuovo, lascian l'acqua distendersi e rallentarsi in nuovi golfi e in nuovi seni.
that gives
please note that numbers doesn't protrude and that the space between lines is always the same: no matter if we have a number or not. In short, this almost circled numbers works very well even if they are inside a text.
\textcircled
?\textcircled{0}
…\textcircled{9}
in Computer Modern are better than in the OP. Namely, running pdflatex on pastebin.com/raw/fwY6wFz9 yields i.imgur.com/nDZZ14q.png . Here, most circles don't touch the digits, whereas in the OP, all circles visibly touch the digits.