10

I have a large bunch of text in a mdframed environment, that span more than one page.

As it seems reading the documentation, the mdframed environment put every footnotes at the end of the frame, by design.

Is there a way to put each footnotes at the bottom of the page where it belongs, remaining inside the frame? I know it should be possible, using maybe the \footnotemark and \footnotetext commands, but the mdframed internals are too complicated for me...

Here a code sample that shows the default behaviour:

\documentclass[]{report}
\usepackage{lipsum}
\usepackage{mdframed}

\begin{document}

\begin{mdframed}

    \lipsum[1]
    \lipsum[2]\footnote{can I appear in the first page inside the box?}
    \lipsum[1]
    \lipsum[1]
    \lipsum[3]

\end{mdframed}

\end{document}
3
  • 2
    It's quite a problem: mdframed must know how much space is available on the page; and the footnote may or may not end in that page, depending on where it falls in the framed material. I think that some clever trick as done in bigfoot could solve the problem, but it's quite intricated.
    – egreg
    Jun 12, 2012 at 15:07
  • 1
    @egreg, you are right, but only if we want the footnote to appear in the right page outside the frame. I'm looking for a way to do it with the footnote inside the frame, so basically you have to put the entire page in the frame (meaning entire_page = text + possible footnote). This should be more simple, maybe! I'll check the bigfoot package, thx
    – pjcairo
    Jun 12, 2012 at 20:07
  • any solutions so far?
    – kuuhkuuh
    Jun 12, 2016 at 0:00

1 Answer 1

7

It's quite a problem: mdframed must know how much space is available on the page; and the footnote may or may not end in that page, depending on where it falls in the framed material. I think that some clever trick as done in bigfoot could solve the problem, but it's quite intricated.

So, unfortunately, the answer is "not possible without very hard work".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .