mdframed and a title with a footnote

I have put the title of my text in mdframed, however the title has a footnote. After I LaTeX the file, the footnote appears inside the frame rather than in its usual place, i.e. at the bottom of the page. I wonder how this problem can be fixed.

-
Is the problem in the fact that the framed text splits across pages, leaving the footnote mark on one page and the footnote text on the following? – egreg Dec 28 '12 at 22:53

Using a separate \footnotemark-\footnotetext combination should work, as in the following minimal working example. The former inside and the latter outside the mdframed environment:

\documentclass{article}
\usepackage{mdframed}% http://ctan.org/pkg/mdframed
\usepackage[paperheight=15\baselineskip]{geometry}% http://ctan.org/pkg/geometry
\begin{document}
\begin{mdframed}
Some text\footnote{A footnote}.
\end{mdframed}
\bigskip
\begin{mdframed}
Some text\footnotemark.
\end{mdframed}
\footnotetext{Another footnote.}
\end{document}


geometry was used just for this example.

For page-breaking related placement of footnotes, the following is a possibility, however hackish. Using the above approach, \footnotetext will only place the footnote at the end of the mdframed, possibly on an incorrect page. Manual adjustment of the footnote counter could help:

\documentclass{article}
\usepackage{lipsum,mdframed}% http://ctan.org/pkg/{lipsum,mdframed}
\usepackage[paperheight=15\baselineskip]{geometry}% http://ctan.org/pkg/geometry
\begin{document}
\begin{mdframed}
Some text\footnote{A footnote}.
\end{mdframed}
\bigskip
\stepcounter{footnote}
\footnotetext{Another footnote.}

Using \footnotetext[\the\numexpr\value{footnote}+1\relax]{Another footnote.} could also work, assuming an \arabic setting for a footnote.
It was helpful for me too, but I wonder if there is an alternative for the second issue. It would be a bit tedious to write these lines every time again, so, do you know of any alternative methods? (Of course I could replace those 3 lines \stepcounter{footnote}\footnotetext{Another footnote.}\addtocounter{footnote}{-1} by a single command. Possibly I'll do that if no alternative shows up.) Thanks in advance. – barto Jun 26 '14 at 7:52