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.

David Carslie proposed a solution here. The question is what to do if you have an environment that is several pages and you want the footnote to appear at the bottom of the page where the footnote mark appear not at the bottom of the last page.

A minimal working example:

\documentclass{report}
\makeatletter
\newtoks\FTN@ftn
\def\pushftn{%
 \let\@footnotetext\FTN@ftntext\let\@xfootnotenext\FTN@xftntext
  \let\@xfootnote\FTN@xfootnote}
\def\popftn{%
 \global\FTN@ftn\expandafter{\expandafter}\the\FTN@ftn}
\long\def\FTN@ftntext#1{%
  \edef\@tempa{\the\FTN@ftn\noexpand\footnotetext
                    [\the\csname c@\@mpfn\endcsname]}%
  \global\FTN@ftn\expandafter{\@tempa{#1}}}%
\long\def\FTN@xftntext[#1]#2{%
  \global\FTN@ftn\expandafter{\the\FTN@ftn\footnotetext[#1]{#2}}}
\def\FTN@xfootnote[#1]{%
   \begingroup
     \csname c@\@mpfn\endcsname #1\relax
     \unrestored@protected@xdef\@thefnmark{\thempfn}%
   \endgroup
   \@footnotemark\FTN@xftntext[#1]}

\makeatother
\usepackage{framed,lipsum}
\begin{document}
\begin{framed}\pushftn
\footnote{Test}\lipsum
\end{framed}\popftn

\end{document}
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.