DEV Community

Breno Viana
Breno Viana

Posted on • Updated on

Using multiple footnotes in float environments

The problems

I was writing my MSc thesis when I just tried to add two footnotes in the captions of two subfigures. The result of my first try was something like this:

Alt Text

Well, the problem is that I expected the footnotes to be at the bottom of the page. And I solved it quite fast by using \footnotemark[...] and \footnotetext[...]{...}. However, another problem arose: only the label of the last footnote was linkable and I wanted both to be linkable.

The fix

I googled a lot but no solution was good enough to solve both problems. I found some solutions proposing using the footnotehyper package but they did not help with the first problem. After some hours I found this 2012 post showing the savenotes environment of footnote package. It did not solve my second problem, but I realized that the footnotehyper could be based on the footnote so I could use the savenotes environment as well. And it worked finely! More about the footnotehyper documentation here.

The code






            \caption{A cat.}
            \caption*{Source: \href{}{Unsplash}\footnote{Source: \href{}{}.}.}
            \caption{A dog.}
            \caption*{Source: \href{}{Unsplash}\footnote{Source: \href{}{\_k}.}.}

Enter fullscreen mode Exit fullscreen mode

The result

Alt Text


Discussion (0)