TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If there is a \footnote inside an mdframed environment, then I can control, via the footnoteinside=false flag, whether or not I want those footnotes included inside the frame or outside. But even when typeset outside the frame, they will immediately follow the frame. Is there a way, perhaps using a small hack, to print these footnotes at the end of the (last) page where the frame was included?

share|improve this question
up vote 4 down vote accepted

This seems to work.







share|improve this answer
Looks nice, but the manual stepping of the footnote counter means that one still hase to take extra care oneself to not use more than one footnote (which will break my approach as well), and to match environment name to whether or not a footnote was used. However, using \def\@mpfn{footnote} I was able to avoid that explicit stepping, and \let\thempfootnote=\thefootnote will ensure these two always match. Did you develop this answer from a failed attempt with the tablefootnote package, thus answering your own comment? – MvG May 11 '13 at 7:17
@MvG I remember a similar solution that I have seen in here in tex.sx. I also had a feeling that tablefootnote would work :) – cacamailg May 11 '13 at 16:19
@cacamailg When I try to compile this, I can not compile, and get the error: Undefined control sequence. \pgfsyspdfmark {pgfid1}{8799518}{42674430}. – Vincent Verheyen Apr 25 at 20:43
@VincentVerheyen I compiled the code above without any problem. My version is TeXLive 2015. – cacamailg Apr 25 at 20:51
@cacamailg Ok, it's probably because of my TeX Live 2014. – Vincent Verheyen Apr 25 at 20:52

The standard behavior of footnotes of mdframed orientates on the standard behaviour of footnotes of minipage. mdframed is using the same counter.

However a simple method to prints footnotes at the bottom of the package is a minor alteration of tablefootnote provided by the package tablefootnotes:

share|improve this answer
I knew that was a way... :) – cacamailg May 11 '13 at 16:12
@cacamailg: :-) – Marco Daniel May 11 '13 at 16:13

I found out that I could achieve the desired result by writing \footnotemark inside the frame and \footnotetext{…} after it. This had the added benefit of using a numbering scheme consistent with the rest of my document: A footnote set by mdframed used lower case alphabetical numbering, whereas the rest of my document used arabic numbers for footnotes. With the above approach, everything was arabic.

share|improve this answer
The footnotes of mdframed are equal to footnotes inside minipage or tabular. – Marco Daniel May 10 '13 at 19:07
@MarcoDaniel would they work with tablefootnote package? – cacamailg May 11 '13 at 0:46
@cacamailg: It works if you add a command to the end of mdframed: \documentclass[]{article} \usepackage[framemethod=tikz]{mdframed} \usepackage{tablefootnote} \makeatletter \AfterEndEnvironment{mdframed}{% \tfn@tablefootnoteprintout% \gdef\tfn@fnt{0}% } \makeatother \begin{document} \begin{mdframed} foo \tablefootnote{foo} bar \tablefootnote{bar} \end{mdframed} \end{document} – Marco Daniel May 11 '13 at 7:48

Your Answer


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.