1

Introduction

Here we collect different solutions to enumerate footnotes with circled numbers both in texts and footnotes for which advantages and disadvantages are specified.

In fact, it’s Chinese who usually enumerate the footnotes with circled numbers, and in Chinese, every circled number has the width of 1em as the same as every Chinese character. Anyway, any solution is welcome.

A MWE is as follows.

\documentclass{article}

\begin{document} \par Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. \end{document}

Summary

So far as now we have five solutions as follows which have their own advantages and disadvantages.

M. Logic
  • 4,214

3 Answers3

5

Update:

After discussion with OP, I have an updated solution, still using TikZ.

Add this to the preamble:

\newcommand{\fnrad}{.16}

\usepackage{scrextend,tikz,scalerel} \newcommand\circled[2][\fnrad]{\kern.5pt\scalerel*{\tikz{\useasboundingbox (-#1,-#1) rectangle (#1,#1);\node{#2};\draw circle[radius=#1];}}{X}\kern.5pt} \deffootnotemark{\textsuperscript{\smash{\circled{\thefootnotemark}}}}

The command \circled uses scalerel to produce a circled number the same height as a capital letter X, which adjusts if the X changes in size (e.g., titles, superscripts, \large).

enter image description here

The global constant \fnrad (currently set to .16) can be adjusted to create more space around the number without changing the size of the circle. Larger value produces more space. That spacing can also be adjusted with an optional argument in case the footnote appears in special positions like a title:

\large 1\circled{1}\circled[.18]{1}

enter image description here

Advantages:

  • Doesn't affect line spacing in text or in footnotes.
  • Uses original font.
  • Adjusts for font changes and size changes.

Disadvantages:

  • Is using TikZ a disadvantage?

Old Solution:

Add this to the preamble:

\usepackage{scrextend,tikz}
\newcommand\circled[1]{\tikz[baseline]{\node[anchor=base,rounded corners=.375em,draw,inner sep=1pt] {#1};}}
\deffootnotemark{\textsuperscript{\smash{\circled{\thefootnotemark}}}}

Advantages: Easy. Doesn't affect line spacing in text or in footnotes. Uses original font.

Disadvantages: Uses TikZ (is that a disadvantage?). Might have to adjust rounded corners for different font. Ovals for 2-digit numbers.


Remarks

Sandy G
  • 42,558
  • 1
    +1: I took the liberty and added some supplementary information. Hope that it is ok. – Dr. Manuel Kuehner Apr 03 '22 at 03:36
  • So, the space between lines is larger, isn't? Otherwise, it would be some ugly? – karloswitt Apr 03 '22 at 10:46
  • @karloswitt It could be improved by scale the size of circled numbers with a suitable value, which have a larger size than the normal size both in normal texts and superscripts. And in fact it's better to use both \raisebox (since for example, 1 and circled 1 has different baselines) and \scalebox (since for example, 1 and circled 1 has different sizes) at the same time as in my solutions as follows. – M. Logic Apr 03 '22 at 12:12
  • In fact no, you could compare 1 with \circled{1} in a large font size. By the way, I found another problem: the circle doesn't circle the numbers completely when they are in a large font size. And it will bring about problems when to write or refer footnotes in big titles. – M. Logic Apr 03 '22 at 15:23
  • Also, circled numbers should be one character as the same as numbers (at least we think so in Chinese), so \cirecled{1} and 1 should have the same size (height). – M. Logic Apr 03 '22 at 15:26
  • @M.Logic: I didn't understand your original request. I thought you simply wanted the footnote numbers to be circled. Your newest edit to the question makes this much more clear. – Sandy G Apr 03 '22 at 15:35
  • @SandyG I think what karloswitt means is that the size of circled number is a bit larger compared to the usual ones (the default arabic numbers or circled numbers produced by the pifont package). – M. Logic Apr 03 '22 at 15:37
  • @SandyG I think your idea is very good and all the small problems could be improved. Anyway, thanks very much. – M. Logic Apr 03 '22 at 15:39
  • Understood, I can change it back but not now (I am on my phone the next hours). – Dr. Manuel Kuehner Apr 03 '22 at 16:01
  • @SandyG Now it's better. – M. Logic Apr 04 '22 at 01:26
  • @M.Logic: Sandy Ganzell – Sandy G Nov 21 '22 at 17:59
  • Thanks for your answer! However, if I use the updated solution in an emphasis text, like the theorem environment with theoremstyle{theorem}, the number is also emphasis style. How can I change it to Roman style? – Asigan Nov 19 '23 at 11:55
  • @Asigan: If you change \node{#2} to \node{\normalfont#2} does that do what you want? – Sandy G Nov 19 '23 at 15:36
  • Thank you! This works well. – Asigan Nov 19 '23 at 16:10
3

One way to do this without TikZ would be to use predefined Unicode glyphs for circled numbers: ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩. Font support varies, though, so care must be taken to use a font that actually supports the glyphs. I have used Arial Unicode in my example (which, due to the use of fontspec also requires either XeLaTeX or LuaLaTeX.)

\documentclass{article}

\usepackage{fontspec} % Make sure your font supports circled numbers (U+24EA .. U+32BF) \setmainfont{ArialUni.ttf}

\makeatletter \newcommand*{\myfootnote}[1]{% Redefine footnote symbols: \ensuremath{% \ifcase#1% 0 \or ① \or ② \or ③ \or ④ \or ⑤% \or ⑥ \or ⑦ \or ⑧ \or ⑨ \or ⑩% % Toying with Chinese circled numbers (Ideographs ≥ U+3280) % \or ㊀ \or ㊁ \or ㊂ \or ㊃ \or ㊄ % \or ㊅ \or ㊆ \or ㊇ \or ㊈ \or ㊉ \or ⑪ \or ⑫ \or ⑬ \or ⑭ \or ⑮% \or ⑯ \or ⑰ \or ⑱ \or ⑲ \or ⑳% \or ㉑ \or ㉒ \or ㉓ \or ㉔ \or ㉕% % can be extended as needed for up to ㊿ \else @ctrerr% \fi }% } \makeatother

% Redefine \footnote command: \renewcommand*{\thefootnote}{\myfootnote{\value{footnote}}}

\begin{document}

Now we test the single-digit footnote numbers.\footnote{Test Nr.,1}\par Now we test the single-digit footnote numbers.\footnote{Test Nr.,2}\par Now we test the single-digit footnote numbers.\footnote{Test Nr.,3}\par

\setcounter{footnote}{9}% Skip a few footnotes \vspace{1em}% Add some vertical space

Now we test footnote numbers with two digits.\footnote{Test Nr.,10}\par Now we test footnote numbers with two digits.\footnote{Test Nr.,11}\par Now we test footnote numbers with two digits.\footnote{Test Nr.,12}\par

\end{document}

Although I have used ① .. ㉕ in my example, arbitrary symbols would work just as well.

Addendum: If we need to support both \usepackage[no-math]{fontspec} and Chinese characters, the following might work:

\documentclass{article}

\usepackage[no-math]{fontspec} \setmainfont{ArialUni.ttf}

\usepackage{xeCJK} \setCJKmainfont{SimHei.ttf}

\makeatletter \newcommand*{\myfootnote}[1]{% Redefine footnote symbols: \ifcase#1% 0 \or ① \or ② \or ③ \or ④ \or ⑤% \or ⑥ \or ⑦ \or ⑧ \or ⑨ \or ⑩% \or ⑪ \or ⑫ \or ⑬ \or ⑭ \or ⑮% \or ⑯ \or ⑰ \or ⑱ \or ⑲ \or ⑳% \or ㉑ \or ㉒ \or ㉓ \or ㉔ \or ㉕% \else @ctrerr% \fi } \makeatother

% Redefine \footnote command: \renewcommand*{\thefootnote}{\myfootnote{\value{footnote}}}

\begin{document}

你好,这是一个测试文档。\footnote{Test Nr.,1}\par

Now we test the single-digit footnote numbers.\footnote{Test Nr.,2}\par \setcounter{footnote}{9}% Skip a few footnotes \vspace{1em}% Add some vertical space

Now we test footnote numbers with two digits.\footnote{Test Nr.,10}\par

\end{document}

(It uses the standard article class instead of ctexart, which may or may not be acceptable.)

enter image description here

Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • So it's very important whether the font has such circled numbers from 1 to 50. – M. Logic Apr 03 '22 at 09:39
  • Yes, you'll obviously need a font that has the required glyphs. Support for ① .. ⑩ is at least moderately common, I think, but the whole approach is probably most practical if you're using a font that has them anyway (like, say Linux Libertine / Libertinus. ) – Ingmar Apr 03 '22 at 10:15
  • If we use \documentclass{ctexart} instead of \documentclass{article} and \RequirePackage[no-math]{fontspec} instead of \usepackage{fontspec} before \documentclass{}, then it says 'Missing character' when to compile the file. Then how to solve the clash? – M. Logic Apr 07 '22 at 05:17
  • \ensuremath is an artifact of when I used the same code with various symbols. You can simply leave it out. That said, I have zero experience with ctexart. It seems to load additional fonts (SimHei and KaiTi, for starters) which are not readily available to me (and might be missing the required glyphs anyway.) That said, I have found a way to make my method work with both \usepackage[no-math]{fontspec} and support for Chinese characters. I will amend my answer. – Ingmar Apr 07 '22 at 05:18
  • Sorry, I am not at all familiar with Chinese or, in fact, any non Latin-based writing systems. My revised answer is the best I can do … – Ingmar Apr 07 '22 at 05:31
  • If we use \documentclass{ctexart} instead of \documentclass{article} (you needn't install Chinese fonts) and \RequirePackage[no-math]{fontspec} instead of \usepackage{fontspec} before \documentclass{}, and delete the \ensuremath command, then it says 'Missing character' for circled numbers bigger than 20 only (it's ok for ones smaller than 21) when to compile the file. It's very strange.... – M. Logic Apr 07 '22 at 05:34
  • A reasonable hypothesis would be that your font only has glyphs for ① up to ⑳. – Ingmar Apr 07 '22 at 05:36
  • But I add circled numbers from 0 to 50 to the English font file by the font editing software. It says 'Missing character' for circled numbers bigger than 20 in Chinese font, while it's ok for ones smaller than 21 in the English font. I don't know what's wrong, – M. Logic Apr 07 '22 at 05:50
  • Your new answer also has such problem that you can test to invoke ㉑. – M. Logic Apr 07 '22 at 10:09
1

Here I give three solutions: the first one appears in June, 2011 and is the best choice before the second and third ones come out in April, 2022; the second and third ones are improved versions of the usual solution by the tikz package.

1. By the pifont package

  • Due to: @Leo Liu (Cf. the link in which the solution appears at first)
  • Recommendation Index: ★★★★
  • Advantages: (1) enumerate footnotes with circled roman or sans serif numbers which has beautiful appearances and suitable sizes; (2) you can compiles the file in LaTeX, PDFLaTeX, XeTeX, XeLaTeX, LuaLaTeX and so on.
  • Disadvantages: (1) the number font is not in the computer modern series, or can't be the same as the font you are using; (2) the number can't be greater than 10, otherwise their appearances would be different.

It may be the most popular solution right now before the second and third solutions as follows come out, since the number of footnotes on one page is usually no more than 10. Its codes and testing output are as follows.

\documentclass{article}
\usepackage{pifont}%for circled numbers
%%%enumerate footnotes with circled numbers%%%%%%
\renewcommand\thefootnote{\ding{\numexpr171+\value{footnote}}}%roman
%\renewcommand\thefootnote{\ding{\numexpr191+\value{footnote}}}%sans serif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \par Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. \end{document}

enter image description here

2. By the tikz, graphics, etoolbox and microtype packages

  • Due to: @M. Logic and @CarLaTeX (Cf. the link)
  • Recommendation Index: ★★★★★
  • Advantages: (1) enumerate footnotes with circled roman or bfseries or itshape or sffamily or ttfamily numbers which has beautiful appearances and suitable sizes; (2) the number font is in the computer modern series, or could be the same as the font which is collected in the TeX system; (3) the number could be greater than 10 and less than 100.
  • Disadvantages: (1) you can compiles the file only in LaTeX and PDFLaTeX because of the use of the microtype package; (2) you should adjust the parameters with different fonts.

It's important to scale the width of two-digit numbers with a suitable value and decrease the spacing of two-digit numbers in the solution. It may be one of the best choices, since the number of footnotes on one page can't be more than 99. Its codes, circled numbers from 0 to 99, and testing output are as follows.

\documentclass{article}
\usepackage{tikz}
\usepackage{graphics}%for \scalebox
\usepackage{etoolbox}%for \ifnumcomp
\usepackage{microtype}%for \textls
%%%define circled command%%%%%%%%%%%%%%
\tikzset{circlednode/.style={
    circle,
    draw,
    inner sep=0.05ex,
    text depth=0ex,
    font=\normalfont,
    minimum size=1ex
    }
}
\newcommand*\circled[1]{%
    \ifnumcomp{#1}{>}{9}{% 
    % if > 9:
    \tikz[baseline=(char.base)]\node[circlednode] (char) {\textls[-70]{\scalebox{0.5}[1]{\bfseries#1}}};}{%
    % if <= 9: 
    \tikz[baseline=(char.base)]\node[circlednode] (char) {#1};}%
}
%%%footnote numbers setting%%%%%%%%%%%%%%%
\makeatletter
%make footnote numbers be circled------------------
\renewcommand{\thefootnote}{%
    \raisebox{0.25ex}{%
    \scalebox{0.7}{\protect\circled{%
            \arabic{footnote}}%
        }%
    }%
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \par Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. \end{document}

enter image description here

enter image description here

3. By the tikz, graphics, etoolbox and fontspec packages

  • Due to: @M. Logic and @CarLaTeX (Cf. the link)
  • Recommendation Index: ★★★★★
  • Advantages: (1) enumerate footnotes with circled roman or bfseries or itshape or sffamily or ttfamily numbers which has beautiful appearances and suitable sizes; (2) the number font could be the same as the font which is installed on your computer; (3) the number could be greater than 10 and less than 100.
  • Disadvantages: (1) you can compiles the file only in XeTeX, XeLaTeX and LuaLaTeX because of the use of the fontspec package; (2) you must set the main font which could be identified by the fontspec package; (3) you should adjust the parameters with different fonts.

It's important to scale the width of two-digit numbers with a suitable value and decrease the spacing of two-digit numbers in the solution. It may be one of the best choices, since the number of footnotes on one page can't be more than 99. Its codes, circled numbers from 0 to 99, and testing output are as follows.

\documentclass{article}
\usepackage{tikz}
\usepackage{graphics}%for \scalebox
\usepackage{etoolbox}%for \ifnumcomp
\usepackage{fontspec}%for \addfontfeature
\setmainfont{Arial}
%%%define circled command%%%%%%%%%%%%%%
\tikzset{circlednode/.style={
    circle,
    draw,
    inner sep=0.05ex,
    text depth=0ex,
    font=\normalfont,
    minimum size=1ex
    }
}
\newcommand*\circled[1]{%
    \ifnumcomp{#1}{>}{9}{% 
    % if > 9:
    \tikz[baseline=(char.base)]\node[circlednode] (char) {\addfontfeature{LetterSpace=-9.0}\scalebox{0.5}[1]{\bfseries#1}};}{%
    % if <= 9: 
    \tikz[baseline=(char.base)]\node[circlednode] (char) {#1};}%
}
%%%footnote numbers setting%%%%%%%%%%%%%%%
\makeatletter
%make footnote numbers be circled------------------
\renewcommand{\thefootnote}{%
    \raisebox{0.25ex}{%
    \scalebox{0.7}{\protect\circled{%
            \arabic{footnote}}%
        }%
    }%
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \par Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. Now we test the footnote numbers with two digits\footnote{Test}. \end{document}

enter image description here

enter image description here

M. Logic
  • 4,214
  • You could, of course, also simply use a font that supports circled numbers. Unicode has had them for some time U+24EA: CIRCLED DIGIT ZERO … U+32BF: CIRCLED NUMBER FIFTY. ⓪ ㊿ – Ingmar Apr 02 '22 at 14:59