# footnotes and floats

I'm having some troubles with using footnotes inside floats. I use \footnotemark and \footnotetext, but then the float is pushed to the next page, and the footnote remains in the previous one.

As a remedy, I've moved the \footnotetext couple of paragraphs later so now the footnote is located at the right place. BUT, now the numbering is incorrect -- in those "in between" paragraphs there was another \footnote which have advanced the counter.

Since the float was pushed - the numbering is reverted now: the footnote in the float (that got the number n) appears after the next footnote (that was assigned to the number n+1, obviously).

Is there any way to fix that, other than manually changing the counters?

• Use \footnotemark, then run your document and have a look at which page your float appears, then put \footnotetext anywhere in the source of that page. No other chance here to get it right. – user2478 Jan 11 '11 at 8:27
• Apart from the technical problems there is no good logical numbering possible: Assume that on your page you have "some text, a footnote, a reference to the figure, text, footnote, again ref-fig, footnote, and the bottom the figure with its footnote." Then your reader would have to read the footnotes in the order 1,4,2,4,3. text flow and reading flow conflicts here. floats are self contained objects and should carry their footnotes with them. If you really can't do this you could try a second set of footnotes (manyfoot, bigfoot). But then you should use it with all figures and tables. – Ulrike Fischer Jan 11 '11 at 9:32
• @Herbert - this actually cause a numbering issue, since both the footnotes will have the same number (this is since the 2nd footnote advances the counter) @Ulrike - using a different set of footnotes is a nice bypass. Though, I still would've preferred just to "push" the (float's) footnote to the place it actually placed, and hope the numbering will be in the order they appear in the output (rather than in the input). – Ran G. Jan 11 '11 at 20:20
• counters can be increased or decreased by \stepcounter or \addtocounter – user2478 Jan 11 '11 at 21:03

Usually it's best not to put footnotes inside floats; the minipage environment sets things up so you can have "local" footnotes for such occasions. E.g.,

\begin{figure}
\begin{minipage}{\linewidth}
...\footnote{blah}...
\end{minipage}
\end{figure}


The same advice holds for the quite common practice of putting notes for tables directly beneath them rather in footnotes on the page itself.

• Hmmm.. I've considered this solution, but in my case the footnote doesn't fit in the figure. – Ran G. Jan 11 '11 at 7:12

The perpage package provides the \MakeSorted command for rearranging numbers in the order of actual appearance rather than source order. However, if you split a footnote into separate \footnotemark and \footnotetext, it will depend on circumstances whether the results are actually useful here. Worth trying out, but you are probably better off avoiding this situation altogether.

Trying this out would involve putting

\usepackage{perpage}
\MakeSorted{footnote}