I'm frequently using the following group code to reduce vertical space between some equations (with the equation, align, gather and other maths environment) and the text above it:
\begingroup\abovedisplayskip=0pt
some equations in there
\endgroup
But instead of typing this group code each time by hand, how could I create a simple macro in the preamble to do the same? I'm guessing that the macro should be used like the following, but can it be simpler?
\eqlift
some equations in there
\eqdown
Here's a MWE code that shows the problem, which I solve with the code above (only after compilation):
\documentclass[11pt,letterpaper,twoside]{book}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
Blabla bla :
\begin{equation}
y(x) = a \, x^2.
\end{equation}
Blabla bla blabla bla bla :
\begin{equation}
y(x) = a \, x^2.
\end{equation}
Blabla bla blabla bla blabla :
\begin{equation}
y(x) = a \, x^2.
\end{equation}
Blabla bla blabla bla blabla blabla bla bla blabla :
\begin{equation}
y(x) = a \, x^2.
\end{equation}
\end{document}
And here's a preview of what it does:

I often get some too large vertical space for any class, any font size or other configuration I've tried in the past (see equation (3) in the preview picture). The only way I know to solve this, is to insert the group code I've shown above.

\newenvironment{raiseequations}[1][0pt]{\setlength{\abovedisplayskip}{#1}}}{}? And then\begin{raiseequations}[<optional length>] ... equations ... \end{raiseequations}. – Henri Menke Dec 06 '19 at 01:55nccmathpackage package but ran into numerous issues (mostly related tominipages) that I decided to drop it. See Is there a replacement for nccmath? and the problems listed in the question. – Peter Grill Dec 06 '19 at 03:07\abovedisplayshortskipand the second two use\abovedisplayskipwhich is typically larger, but does not need to be, but why do you only mark (3) and not (4) ? – David Carlisle Dec 06 '19 at 08:07\hspace*(-1em)to both ends. This would be appropriate when the actual length of the equation is very close to the2emlimit (as described in @David Carlisle's answer), and still requires a visual review of the output. But it wouldn't suffer from the bad effects demonstrated in the cited answer. – barbara beeton Dec 06 '19 at 15:27\hspace*:\begin{equation} \hspace*{-1em} y(x) = a \, x^2. \hspace*{-1em} \end{equation}– barbara beeton Dec 10 '19 at 04:02