2

Is it possible to create the following symbol,

Circled 1 (or any number or letter).

The output should be something like \textregistered except R being replaced by 1 (or the corresponding number or letter, as the case may be).

  • Numbers only (digits!) \usepackage{pifont} and \ding{172} for circled 1. There are other variants – user31729 Oct 23 '15 at 13:19
3

Or may be this:

\documentclass{article}
\usepackage{textcomp}
\usepackage{tikz}
\newcommand{\mycircled}[1]{%
 \begin{tikzpicture}[baseline={(char.base)}]
   \node[draw,circle,inner sep=0.5pt] (char){#1};
 \end{tikzpicture}
 }
\begin{document}
  \textcircled{9} %% Works good upto a number of 9 (single digits)
  \mycircled{12} \mycircled{R} \mycircled{123}
\end{document}

enter image description here

With constant sized circle:

\documentclass{article}
\usepackage{tikz}
\newcommand{\mycircled}[1]{%
 \begin{tikzpicture}[baseline={(char.base)}]
   \node (char) {#1};
   \node[draw,circle,minimum size=16pt,inner sep=0pt,overlay] (char.center){};
 \end{tikzpicture}
 }
\begin{document}
  \mycircled{R} \mycircled{123}
\end{document}

enter image description here

| improve this answer | |
  • 1
    I should learn TikZ!!! – user31729 Oct 23 '15 at 13:33
  • @HarishKumar Why do you use two \node commands? Wouldn't \node[draw,circle,inner sep=0.5pt] (char.base){#1}; suffice? – jarauh Oct 23 '15 at 13:40
  • @jarauh: Yes, that is the remnant of previous try where I kept the size of circle constant. I will change. Thanks for noting. – user11232 Oct 23 '15 at 14:06
2

The pifont package provides (more or less) nice circled numbers with \ding{...} (different ranges, starts at 172) and different background/style.

For letters \textcircled works (somehow), the output is alright for lower case letters, but not for uppercase ones. I suggest to scale them down. For a better usage with uppercase letters, the solution by Harish using TikZ is very nice!

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage{pgffor}

\usepackage{pifont}

\begin{document}


\foreach \x in {172,...,181} {
\ding{\x} 
}


\foreach \x in {182,...,191} {
\ding{\x} 
}

\foreach \x in {192,...,201} {
A\ding{\x} 
}

Different letters:


\foreach \x in {a,...,z} {%
 A \textcircled{\x}
}

Uppercase

\foreach \x in {A,...,Z} {%
 A \textcircled{\small\x}
}


\end{document}

enter image description here

| improve this answer | |
  • But the font is small and the output looks like Some text ^{circled 1} not Some text {circled 1}. – user79095 Oct 23 '15 at 13:24
  • @user170039: I don't understand – user31729 Oct 23 '15 at 13:27
  • @HarishKumar: Fifth of many more to come :-P – user31729 Oct 23 '15 at 13:31
  • @user170039: The output definitely does not look like ^{circled 1} And fonts can be scaled ;-) – user31729 Oct 23 '15 at 13:35