To get the footnotes at the bottom of the page rather than at the bottom of the tcolorbox, I use \footnotemark inside the tcolorbox and \footnotetext below the tcolorbox. Here is a MWE:


This is a \textbf{tcolorbox}\footnotemark.

And this is some text.\footnotemark. 
\footnotetext{This is footnote 1}
\footnotetext{This is footnote 2}
And more text.\footnote{This is footnote 3}

and here is the output: (I had to fake it a bit in order to keep the size of the picture reasonable.):


Note that, at the bottom of the page, Footnote 2 and Footnote 3 are both labelled correctly as 2 and 3 while Footnote 1 is incorrectly labelled 2.

  • It would show the same labels without tcolorbox as well! – user31729 Jan 22 '17 at 22:54
  • @ChristianHupfer I don't understand: without tcolorbox there is no point using footnotemark. – schremmer Jan 22 '17 at 23:10
  • @ChristianHupfer But only the first footnote is incorrectly labelled as 2. Footnote 2 and Footnote 3 are labelled correctly as 2 and 3. So, the footnote counter is incremented correctly. – schremmer Jan 22 '17 at 23:16
  • Yes, I was looking into the wrong code... forget my comment – user31729 Jan 22 '17 at 23:17
  • 1
    I think I could track it down: The problem is that \footnotemark increases footnote, stores \@thefnmark in a global expanded definition, the next \footnotemark will overwrite this definition, but \footnotetext does use only the last value of \@thefnmark, it is not aware that there have been multiple \footnotemark` commands before – user31729 Jan 22 '17 at 23:22

The cause for this problem has nothing to with tcolorbox -- \footnotetext uses \@thefnmark which is overwritten each time \footnotemark is applied, so multiple calls of \footnotemark will increase the footnote counter but there is no association of those footnote counter values with the corresponding \footnotetext. Multiple specifications of \footnotetext do not increase the relevant footnote counter label.

It is possible to use \footnotetext[value]{...} instead, which sets the footnote counter in a group -- it will not leak outside.

The solution below tracks the number of \footnotemark calls and assigns a label to it, \morefootnotetext retrieves the label and extracts the counter value, being typeset then with \footnotetext[value]{...}.

This approach will fail if there are more \footnotetext calls than \footnotemark assignments!



\DeclareAssociatedCounters{footnote}{totalfootnotes}% Count all footnotes

\xpretocmd{\footnote}{\stepcounter{totalfootnotetexts}}{}{}% Explicitly step!


This is a \textbf{tcolorbox}\footnotemark

And this is some text.\footnotemark
\morefootnotetext{This is footnote 1 from inside}
\morefootnotetext{This is footnote 2 from inside}
And more text.\footnote{This is footnote 3 from outside}

Now an example with 4 footnotemark\footnote{A dummy footnote} calls
This is a \textbf{tcolorbox}\footnotemark

And this is some text.\footnotemark

Stuff\footnotemark Otherstuff\footnotemark
\morefootnotetext{This is footnote 3 from inside}
\morefootnotetext{This is footnote 4 from inside}
\morefootnotetext{This is footnote 5 from inside}
\morefootnotetext{This is footnote 6 from inside}


enter image description here

  • Perhaps manyfoot will provide another solution – user31729 Jan 22 '17 at 23:51
  • Error: "kernel/property-unknown"! ! The key property '.value_forbidden:n' is unknown. – schremmer Jan 23 '17 at 0:10
  • @schremmer: Well, you have to update your TeX distribution then. (Which is very likely you have to do anyway since tcolorbox uses xparse internally too (in some modules) – user31729 Jan 23 '17 at 0:10
  • My distribution is TeXLive-013 and I am afraid I am going to stay with it as my whole set-up--- myself included---is old. So, thanks for trying and since my stuff is open-source, I will leave it as is and to others to fix it. – schremmer Jan 23 '17 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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