# Footnote in math mode: \footnotemark in math + \footnotetext does not work

Since directly typing \footnote{...} in math mode is not allowed, the common approach is to type \footnotemark in the math and write \footnotetext{...} after the math. However, when the math is located to the bottom of a page, the line containing \footnotetext{...} is on the second page, causing the misplacement of the actual footnote. Example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{pgffor} % for \foreach

\begin{document}

\foreach \x in {1,...,43}
{The \x th fictional space-taking line.

}

$fictional + math + formula \footnotemark$\footnotetext{This is a fictional footnote. See the weird behavior?}

\end{document}


yields

• It is never a good idea to add footnotes in math, how do a reader tell the difference from a power? Sep 24 '18 at 5:42
• I know that, but sometimes that is unavoidable. The symbols can be redefined, though. But this example is completely fictional :P Sep 24 '18 at 5:44
• It is always avoidable. I'm guessing that the footnotetext is leaving behind a whatsit and is therefore leaving something on the vertical list and is then moved to the next page. You probably needs to add it before the math and get creative with the counters. But again don't ever do this, rewrite! Sep 24 '18 at 5:53
• I think using \footnote inside the equation environment should just work in this case. It would not work inside any of the amsmath math environments or inside e.g. \text{} within the equation though. Sep 24 '18 at 15:18

$fictional + math + formula \footnotemark \footnotetext{This is a fictional footnote. See the weird behavior?}$