5

I have problem with footnote in tcolorbox, footnote mark on math mode is numbering with arabic while in the footnote area is numbering with alphabet.

This is an example to show you what I mean,

\documentclass[a4paper,12pt]{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}

\begin{document}

    \begin{tcolorbox}[breakable]
        \lipsum[1]\footnote{Footnote from main box}

    \begin{align*}
        f(x) = mx + b\footnotemark
    \end{align*}
    \footnotetext{test footnote equation from main box}
    \tcblower
        \lipsum[1]\footnote{Footnote from lower box}

        \begin{align*}
            f(x) = mx + b\text{\footnotemark}
        \end{align*}
        \footnotetext{test footnote equation from lower box}
    \end{tcolorbox}

    \lipsum[1]\footnote{Footnote from main page}

    \begin{align*}
        f(x) = mx + b\footnotemark
    \end{align*}
    \footnotetext{test footnote equation from main page}
\end{document}

Also, the footnote won't increased automatically.

1 Answers1

5

According to Kopka and Daly, A Guide to LaTeX, p. 96--97, the \footnote command is not allowed in math mode. If you really want to use it you can use code from Footnote in align enviroment:

\documentclass[a4paper,12pt]{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\makeatletter
\newcommand{\AlignFootnote}[1]{%
  \ifmeasuring@
  \else
    \iffirstchoice@
      \footnote{#1}%
    \fi
  \fi}
\makeatother

\begin{document}

    \begin{tcolorbox}[breakable]
        \lipsum[1]\footnote{Footnote from main box}

    \begin{align*}
        f(x) = mx + b\AlignFootnote{test footnote equation from main box}
    \end{align*}
    \tcblower
        \lipsum[1]\footnote{Footnote from lower box}

        \begin{align*}
            f(x) = mx + b\AlignFootnote{test footnote equation from lower box}
        \end{align*}
    \end{tcolorbox}

    \lipsum[1]\footnote{Footnote from main page}

    \begin{align*}
        f(x) = mx + b\footnotemark
    \end{align*}
    \footnotetext{test footnote equation from main page}
\end{document}
Tahtisilma
  • 2,396
  • Thank you. It's really work perfectly even when implemented with \hyperref. \footnotemark actually failed when using \hyperref (http://tex.stackexchange.com/questions/21813/footnote-in-math-mode#comment41929_21817) – Pattisahusiwa May 05 '14 at 04:46