Text FormattingCircled Number

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
xxmp
Posts: 1
Joined: Sun Oct 30, 2011 1:24 pm

Circled Number

Post by xxmp »

I would like to circle numbers in normal text size. How i am doing this? I tried circled but i have errors with that.
Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Circled Number

Post by Stefan Kottwitz »

Hi,

here's an example:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\begin{document}
Numbers aligned with the text:  \circled{1} \circled{2} \circled{3} end.
\end{document}
numbers.png
numbers.png (3.29 KiB) Viewed 14477 times
I posted it here: Good way to make \textcircled numbers.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Circled Number

Post by localghost »

This issue has been discussed here already. A Forum Search will yiel usable results, e. g. with the pifont package.


Best regards and welcome to the board
Thorsten
SeaLand
Posts: 2
Joined: Fri Aug 06, 2021 3:36 am

Circled Number

Post by SeaLand »

:D Got it ! Thank you so much, Stefan Kottwitz!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Circled Number

Post by Stefan Kottwitz »

And that solution still works fine today after 10 years :-)

Stefan
LaTeX.org admin
Post Reply