# Stackrel and footnote inside the math environment

In my document I have on first page an inequality

\begin{eqnarray*}
a &\stackrel{*}{\leq}& b
\end{eqnarray*}


and also on few other pages I have the same inequality. On each page I want to make a footnote to this stackrel, but I want to have this footnote marked always by the same symbol *. I was trying to make

\begin{eqnarray*}
a &\stackrel{\footnotemark}{\leq}& b
\end{eqnarray*}

\footnotetext{foo}


but every time I have a different symbol corresponding to the footnote. How can I fix that?

• Do you really want to insert a footnote, or only the symbol? Also, you shouldn't use the eqnarray environment, you can have bad horizontal spacing. Replace it with align from amsmath. – Bernard Jul 5 '14 at 15:06
• @Bernard My inequalities are very long, this is only a shorter example and I think that eqnarray is what I really need and want to use. But talking about the footnote, yes I want to have a symbol above the operator and a special comment in footer (so this is a footnote) – Ziva Jul 5 '14 at 15:08
• Please read eqnarray vs align, suggesting a full avoidance of eqnarray due to its spacing problems. – Werner Jul 5 '14 at 15:10
• @Werner Thanks for your suggestion, I will definitely read it – Ziva Jul 5 '14 at 15:32
• As a general rule, I'd avoid footnotes to displayed math formulas. Can you add a sample of the real formulas you have? Change them into nonsense ones, if you prefer not to show your work, just make them approximately the same size as the real ones. – egreg Jul 5 '14 at 17:36

## 2 Answers

Use \starfootnote as defined below:

\documentclass{article}
\newcommand{\starfootnote}[1]{{%
\renewcommand{\thefootnote}{*}%
\footnotetext{#1}}}
\begin{document}
$a \stackrel{*}{\leq} b$
\footnote{Regular footnote.}
\starfootnote{Star footnote.}
\footnote{Another regular footnote.}
\starfootnote{Another star footnote.}
\end{document}


It locally changes the printing of the footnote to be a *, and merely sets the text using \footnotetext. No footnote counter stepping occurs, as it is not needed.

• (la)tex usually considers that it's okay to break a page after a display, so if \starfootnote is issued after the display, and the display is the last thing on a page, the footnote could conceivably be set on the next page. better, then, to issue \starfootnote just before the display, since (la)tex will move the last line of text to a new page rather than separating it from a following display (unless there's a blank line between them, which there shouldn't be). (not tested.) – barbara beeton Jul 5 '14 at 20:47

You also might want to have a footnote just after an equation, or after a group of equations. Here is a way to do it, defining a mathnote and a mathnotetext command:

    \documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{amsmath}
\def\mathnote{\ensuremath{^{\ddagger}}}
\newcommand\mathnotetext[1]{\tag*{\llap{\mathnote\footnotesize#1}}}

\begin{document}

\begin{align*}
a & \leq \mathnote b\\[-1ex]
\mathnotetext{\footnotesize A small note under the equation. }\\[1ex]
c & \leq d
\end{align*}

\begin{align*}
a & \leq \mathnote b\\
c & \leq d\\[2ex]
\mathnotetext{\footnotesize A small note under the group of equations. }
\end{align*}

\end{document}