7

If I use a \footnote command in tcolorbox the footnote will be alphabetically numbered. Question: How do I change this to arabic numbering?

I've tried \renewcommand{\thefootnote}{\arabic{footnote}}, but that didn't work out. And the manual does not even mention the footnote changes.

MWE:

\documentclass{article}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}
    \renewcommand{\thefootnote}{\arabic{footnote}}
    Some footnotes\footnote{Test} should be represented by an arabic number\footnote{Test}
\end{tcolorbox}
\begin{tcolorbox}
    Some footnotes\footnote{Test} should be represented by a letter\footnote{Test}
\end{tcolorbox}
\end{document}  
3
  • Sorry, I did not see that you posted a solution as well, just seconds in advance ;-)
    – user31729
    Commented Jun 25, 2017 at 7:56
  • 1
    @ChristianHupfer But well, I can accept your solution two days earlier and get 2 rep points now :)
    – TeXnician
    Commented Jun 25, 2017 at 8:11
  • Well, you could have accepted your solution anyway and get an upvote (at least from me) (Well, you got it anyway ;-))
    – user31729
    Commented Jun 25, 2017 at 8:12

1 Answer 1

10

The usage of \alph instead of \arabic is no documented feature and only looking into tcolorbox.sty gives some insight about the proceedings in the package:

The counter used in tcolorbox boxes for footnotes is not footnote but mpfootnote (where mp is short for minipage) and \thempfootnote must be changed accordingly.

By default, in latex.ltx, \thempfootnote comes down to \alph{mpfootnote} effectively, i.e. using lower case letters for 'numbering' the footnotes, so the effect is the 'fault' of the LaTeX core itself.

\documentclass{article}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}
  \renewcommand{\thempfootnote}{\arabic{mpfootnote}}
    Some footnotes\footnote{Test} should be represented by an arabic number\footnote{Test}
\end{tcolorbox}
\begin{tcolorbox}
    Some footnotes\footnote{Test} should be represented by a letter\footnote{Test}
\end{tcolorbox}
\end{document} 

enter image description here

Here's a version with code= key and definition of a special box for arabic footnotes:

\documentclass{article}
\usepackage{tcolorbox}

\newtcolorbox{footnotebox}[1][]{code={\renewcommand{\thempfootnote}{\arabic{mpfootnote}}},#1}


\begin{document}
\begin{footnotebox}
    Some footnotes\footnote{Test} are represented by an arabic number\footnote{Test}
\end{footnotebox}

\begin{tcolorbox}
    Some footnotes\footnote{Test} should be represented by a letter\footnote{Test}
\end{tcolorbox}
\end{document} 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .