Your question about having footnotes within a float
environment allows several interpretations.
First, if the footnote mark needs to be placed inside the float's caption
, the short answer is: It can't be done. Well, some TeX wizard might be able to figure out how to do it, but LaTeX's standard footnote mechanisms won't print the footnote text (even though it will print the footnote mark). :-(
Second, for a footnote that should appear at the bottom of the page (as opposed to at the bottom of the float) and should be numbered in the same style as the other footnotes of the document, use the command \footnotemark{}
where you want the footnote's "label" (e.g., a raised number "1") to be placed and the command \footnotetext{...}
at the end of the float, as in the following MWE. AFAIK, this method only works for a single footnote and may therefore be only of limited interest.
\documentclass{article}
\begin{document}
\section{Start}
\begin{figure}[h]
\caption{Some figure} \label{fn:text}
\centering
Some stuff.\footnotemark{} Some more stuff.
\end{figure}\footnotetext{Text of footnote.}
\end{document}
Aside: if the float is to be displayed on a page of its own, load the afterpage
package in the preamble, omit the position specifier ([b]
or [p]
, say) and "encase" the float in an \afterpage{...}
construct, as in
\begin{afterpage}{
\begin{table}
...
\end{table}
\footnotetext{...}
\clearpage % the \clearpage command forces the float to occur on a page by itself.
} %% end of \afterpage{...} "wrapper"
Third, if the float is a figure
, the method described by @AndreyVihrov in his answer -- to embed the body of the figure in a minipage
-- works fine. Note that the footnote marks will "numbered" a
, b
, etc and will be placed at the bottom of the float. When using this method, it's generally a good idea to place the float either at the bottom of the page (so that the float's footnotes also show up at the bottom of the page, "where they belong") or on a page by itself.
Fourth, if the float in question is a table
, you have an additional choice (besides the minipage
method noted in the preceding paragraph) which may be especially useful if you have lots of footnotes and/or repeated callouts to the same footnote: the threeparttable
package. (See this site this page for the documentation of this package.) With this package loaded in the preamble, your float code would look something like
\begin{threeparttable} %% instead of "\begin{table}"
\caption{Some table}
\begin{tabular}{...} %% or tabular*, tabularx, tabulary, ...
...
Some material\tnote{a}\\ %% note the "\tnote" command
More material\tnote{a}\\
...
Still more material\tnote{b}\\
...
\end{tabular} %% or tabular*, tabularx, tabulary, ...
\begin{tablenotes}
\item[a] Footnote "a".
\item[b] Footnote "b".
\end{tablenotes}
\end{threeparttable}
A cool aspect of this package is that if each footnote's text is fairly short, you can use the [para]
option, as in
\begin{tablenotes}[para]
to instruct LaTeX to typeset all table footnotes in "paragraph" style.
floatenv
is just a placeholder for any float environment and not an actual float environment, right? If so, thumbs up for abstracting from your problem, but it probably should be mentioned that this won't compile because thefloatenv
environment isn't defined.