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.

How can one declare a footnote within a float environment, such that it appears on the same page with the float (regularly on the page, not inside the float)? Is there any trick or additional package apart from the widely used workaround

% Let 'floatenv' be any float environment such as figure or table
\begin{floatenv}
    [...] \footnotemark [...]
\end{floatenv}

\footnotetext{<text>}

which already fails if the float is put on a dedicated float-page ({floatenv}[p])?

share|improve this question
4  
Don't footnote floats. Your reader won't know where the footnote comes from. –  egreg Sep 29 '11 at 13:49
1  
I don't know what way round you read footnotes, but imho the idea is that you first see the footnote mark and then look for the footnote and not the other way round. –  barbaz Sep 29 '11 at 13:54
3  
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 the floatenv environment isn't defined. –  doncherry Sep 29 '11 at 15:17
add comment

2 Answers

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.

share|improve this answer
    
Simply using footnotes in the caption of a figure doesn't work for me. The footnote mark is generated and displayed, but the text does not appear anywhere. –  barbaz Sep 29 '11 at 15:17
    
You're right; I've corrected my answer accordingly. –  Mico Sep 29 '11 at 15:50
    
Well, "Second" - which is what I am asking for, a regular footnote on the bottom of the page with the mark within a floating environment - is what i already described in my question and what does not work properly. As the float floats around, the footnotetext won't. And there is also no way to get it on the same page with the float itself if the float is on a floatpage, i.e. it does not work with {figure}[p] for example. Still, thumbs up for a compilation of more workarounds, might help others. –  barbaz Sep 29 '11 at 16:06
    
Please note that issue of the footnote text not showing up on the same page as the float is easily solved by loading the afterpage package in the preamble and "encasing" the entire float as follows: \afterpage{\begin{table}[p] ... \footnotemark{} ... \end{table} \footnotetext{Bla.}}. I hope this helps. –  Mico Sep 29 '11 at 16:14
    
Wow, that was by far the most promising answer. Unfortunately it also does not work. If the figure appears on a floatpage, the footnotetext still ends ob on another page. Additionally, wraping some figures in \afterpage{} seems to completely mess up their order :( –  barbaz Sep 29 '11 at 16:24
show 1 more comment

The solution from Mirco works fine together with the tablefootnote package. Tablefootnote solves the Problem of setting a footnote inside the table (you do not have to use footnotemark and footnotetext anymore) but not the problem that the footnote is set first and then the floating environment table. This means a footnote can appear earlier than the table with the footnotemark. Including the whole Table definition inside \afterpage{Tabledefinition} solves this. The Table can float and the footnote is set on the page the floating environment is set.

share|improve this answer
1  
I don't see that this necessarily solves the problem, since built-up floats can actually occur after the page (to which \afterpage is referring to) and then actually be delayed yet another page. –  Werner Jun 4 '12 at 20:38
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.