number in a circle

2,542 views
Skip to first unread message

Suvadip Paul

unread,
Aug 6, 2011, 6:51:44 AM8/6/11
to LaTeX Users Group
How to write a number within a small circle in latex. i.e say 1
rounded by a small circle.

Sumit Adhikari

unread,
Aug 6, 2011, 9:15:50 AM8/6/11
to latexus...@googlegroups.com
Hi Subhadip,
You might want to consider using metapost
Regards,
Sumit

On 8/6/11, Suvadip Paul <mr.su...@gmail.com> wrote:
> How to write a number within a small circle in latex. i.e say 1
> rounded by a small circle.
>

> --
> You received this message because you are subscribed to the Google Groups
> "LaTeX Users Group" group.
> To post to this group, send email to latexus...@googlegroups.com.
> To unsubscribe from this group, send email to
> latexusersgro...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/latexusersgroup?hl=en.
>
>

--
Sent from my mobile device

Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna

Jaspreet Sarao

unread,
Aug 6, 2011, 11:52:16 AM8/6/11
to latexus...@googlegroups.com
On Sat, Aug 6, 2011 at 4:21 PM, Suvadip Paul <mr.su...@gmail.com> wrote:
> How to write a number within a small circle in latex. i.e say 1
> rounded by a small circle.
\usepackage{pifont}
\ding{192}
It shows the output like a symbol having a circle with 1
If you want 2 then use 193, for 3 use 194....

--
Jaspreet sarao
email: jaspri...@gmail.com
Blog: jaspreetsarao.wordpress.com

Werner Grundlingh

unread,
Aug 6, 2011, 12:01:38 PM8/6/11
to latexus...@googlegroups.com
As suggested by @jaspreet, the pifont package has a variety of circled numbers. Scott Pakin's Comprehensive LaTeX Symbol List
provides a bounty of symbols and typesetting glyphs from all over. Details on the pifont encircled numbers is found in Table 254 (p 77) of the package documentation:
  http://mirror.ctan.org/info/symbols/comprehensive/symbols-a4.pdf

If using this does not suffice, there are other alternatives. Let us know.

KF Leong

unread,
Aug 6, 2011, 1:04:01 PM8/6/11
to LaTeX Users Group
Refer to the discussion in Nabble and a solution:
http://old.nabble.com/Circled-numbers-td30606435.html

HTH,
KF

KF Leong

unread,
Aug 6, 2011, 1:11:45 PM8/6/11
to LaTeX Users Group
And more comprehensive answer from tex.stackexchange:
http://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers

HTH,
KF

Peter Flynn

unread,
Aug 6, 2011, 2:38:55 PM8/6/11
to latexus...@googlegroups.com
On Sat, Aug 6, 2011 at 11:51 AM, Suvadip Paul <mr.su...@gmail.com> wrote:
How to write a number within a small circle in latex. i.e say 1
rounded by a small circle.

Some excellent suggestions. I had to do this for a client last month, for an enumerated list, for which I ended up using the ifsym font package with the geometry option, because I couldn't find a circle big enough otherwise. The enumerated list was actually using lowercase letters, not digits, so here I have reduced the fontsize of the digit to \small, and adjusted the negative kern.

\documentclass{article}
\usepackage[geometry]{ifsym}
\renewcommand\labelenumi{%
    \raisebox{-2pt}{\BigCircle}\kern-7.333pt{\small\theenumi}}%
\newcommand{\ring}[1]{\raisebox{-2pt}{\BigCircle}\kern-7.333pt{\small#1}}
\newcommand{\Ring}[1]{\raisebox{-1pt}{\begin{tabular}{@{}c@{}}{\small#1}\\
      [-11.5pt]\BigCircle\end{tabular}}}
\begin{document}
\begin{enumerate}
\item The first one \ring9\ \ or \Ring8
\item The second one \ring8\ \ or \Ring9
\end{enumerate}
\end{document}

If you wanted the number in an arbitrary context, not a list item, try \ring or \Ring.
I think doing it in a tabular is better, as it centres the digit: in many fonts, digits are all the same width, to make numerical alignments easier; but in some they are not.

///Peter


Reply all
Reply to author
Forward
0 new messages