When I want to place a footnote above some operator I usually use something like this
\begin{equation}
2 + 2 \stackrel{\footnotemark}{=} 4
\end{equation}
\footnotetext{it's trivial.}
which works fine as long as I only use it once in the equation. If I try to use it twice, both of the footnotes get numbered with the bigger counter, like this:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
%
\begin{equation}
1 \stackrel{\footnotemark}{=} 1 \stackrel{\footnotemark}{=} 1
\end{equation}
\footnotetext{is equal to}
\footnotetext{is the same as}
%
\end{document}
In the accepted answer to Multiple footnotes in equations in stackrel/overset with hyperref, the workaround is using the stackon
command from the stackengine
package. However, this has some drawbacks:
1) the hyperref links don't work;
2) the following counter doesn't have the right number, as shown in this example:
\begin{equation}
1 \stackon[1pt]{=}{\Shortstack{\footnotemark[1]}} 1 \stackon[1pt]{=}{\Shortstack{\footnotemark[2]}} 1
\end{equation}
\footnotetext[1]{is equal to}
\footnotetext[2]{is the same as}
%
\footnote{a third footnote, with the wrong counter.}
3) the spaces before and after the equal sign are removed:
So my question is: is there a way to solve this problem while still using stackrel
?