Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Welcome to TeX.SX! –  Heiko Oberdiek May 5 at 3:00

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer
    
Thank you. It's really work perfectly even when implemented with \hyperref. \footnotemark actually failed when using \hyperref (tex.stackexchange.com/questions/21813/…) –  Asis Pattisahusiwa May 5 at 4:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.