#StackBounty: #footnotes #verbatim Footnotes in a verbatim environment that also appear in (or just below) that environment

Bounty: 50

I require a verbatim like environment that allows footnotes and, in addition, displays the footnote text in that environment (as opposed to the page) or just below the environment floating with it.

I have got the following.

documentclass[a4paper,10pt]{book}
usepackage{verbatim}
usepackage{fancyvrb}
usepackage{bera}

newenvironment{MyVerb}[1]
{defheader{S#1}Verbatim[label=header, frame=single, commandchars=@{}]}
{endVerbatim}

begin{document}

An apple a day....

begin{MyVerb}{Blah}
 Blah.
 Blah@footnote{Blah.} blah.
 Blah.
end{MyVerb}

...keeps the doctor away.

end{document}

The footnote numbers appear but the footnote text appears neither on the page nor in the environment. I would like the footnote bodies to appear inside the “boxed” verbatim environment (as opposed to the page).

The footnotes need not be verbatim nor even appear directly in the verbatim environment itself, but they must appear at the bottom of the box around the verbatim.


Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.