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 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}
share|improve this question
1  
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 '12 at 15:07
    
@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 '12 at 20:07
add comment

1 Answer

up vote 6 down vote accepted

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".

share|improve this answer
add comment

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.