# Too much space below equation in a footnote

I'm getting too much space below an equation placed into a footnote, when there's no text below the equation. How can I remove that extra space? Here's a MWE that shows the trouble:

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage{nccmath,amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{showframe}

\begin{document}

Blabla\footnote{Blablabla:
\begin{equation*}
y(x) = x^2.
\end{equation*}
Some blablabla.}

Blabla\footnote{Blablabla:
\begin{equation*}
y(x) = x^2.
\end{equation*}
}

\end{document}


Here's a preview:

I need to remove that extra space (shown in red in the preview picture). How can I tell LaTeX to never add some extra space between the last equation displayed in a footnote and the margin, if there's no text below it?

• Not a solution, but a suggestion on writing style. Some may argue that writing display formulas in footnotes is generally a bad idea (if the formula is important, why stuck it inside a footnote; and if it is not important, why not just use inline math in footnote). You could also write a phrase or two following the formula, so the footnote ends with a sentence rather than a display. – Ruixi Zhang Dec 27 '19 at 21:01
• @RuixiZhang, there are cases for which it would be inapropriate to display the equation in the main text, since it's not about the main subject. I then have to write a footnote for it instead. In the footnote, I usually write some text below the displayed equation. But there are a few cases where the footnote ends with the displayed equation (a list of few small equations, for example). Then, I get that extra space that I want to remove to save space or for other reasons (the extra space is ugly! Especially if there's a second footnote after it). – Cham Dec 27 '19 at 21:20
• can't you use an inline display $y(x)=x^2$ ? a displayed formula in a footnote seems pretty strange to me. (otherwise set \belowdisplayskip=0pt before the formula – David Carlisle Dec 27 '19 at 22:05
• @DavidCarlisle, the displayed equation is pretty big for inline. Example : integral or large fractions... – Cham Dec 27 '19 at 22:07
• don't put it in a footnote then:-) but setting \belowdisplayskip and \belowdisplayshortskip to 0pt will probably do what you want. – David Carlisle Dec 27 '19 at 22:08

You can set the display skips to 0 or for even tighter spacing use an inline math set using \displaystyle

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage{nccmath,amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{showframe}
\let\zzzfootnotesize\footnotesize
\def\newfootnotesize{%
\zzzfootnotesize
\abovedisplayskip=0pt
\belowdisplayskip=\abovedisplayskip
\abovedisplayshortskip=\abovedisplayskip
\belowdisplayshortskip=\abovedisplayskip
}
\renewcommand\footnotesize{\protect\newfootnotesize}

\begin{document}

Blabla\footnote{Blablabla:
\begin{equation*}
y(x) = x^2.
\end{equation*}
Some blablabla.}

Blabla\footnote{Blablabla:
\begin{equation*}
y(x) = x^2.
\end{equation*}
}

\end{document}


or...

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}
\usepackage{nccmath,amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{showframe}

\begin{document}

Blabla\footnote{Blablabla:\\
\makebox[\linewidth]{$\displaystyle y(x) = x^2.$}\\
Some blablabla.}

Blabla\footnote{Blablabla:\\
\makebox[\linewidth]{$\displaystyle y(x) = x^2.$}
}

\end{document}