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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
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 14900 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: 10360
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