4

I often use the stackrel command within an equation in the following way

\documentclass{article}
\begin{document}
%
\begin{equation}
e^{i\pi} + 1 \stackrel{\footnotemark}{=} 0
\end{equation}
\footnotetext{this is Euler's identity.}
%
\end{document}

I'd like to reduce the vertical distance between the footnotemark and the equal sign by default. How can I do it?

3

My answer is based from a bit change of the code by the excellent user @egreg at this link: How can i shrink (or expand) the vertical spacing in \stackrel?

See the result:

enter image description here

\documentclass{article}
\newcommand{\nstackrel}{%
  \mathrel{\vbox{\offinterlineskip\ialign{%
    \hfil##\hfil\cr
    $\scriptscriptstyle\footnotemark$\cr
    \noalign{\kern-.3ex}
    $=$\cr
}}}}
\begin{document}
%
\begin{equation}
e^{i\pi} + 1 \nstackrel 0
\end{equation}
\footnotetext{this is Euler's identity.}
%
\end{document}
3

A stackengine approach. You can adjust the 1st argument of \stackengine from -1pt to get the desired spacing.

You can use \ftmk before other symbols, as well, e.g., + and -.

\documentclass{article}
\usepackage{stackengine}
\newcommand\ftmk[1]{\addtocounter{footnote}{-1}\ensurestackMath{%
  \stackengine{-1pt}{{}#1{}}{\footnotemark}{O}{c}{F}{F}{S}}}
\begin{document}
\begin{equation}
e^{i\pi} + 1 \ftmk= 0
\end{equation}
\footnotetext{this is Euler's identity.}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.