# Vertical space command which is between \intertext and \shortintertext

Is there a way to define a command like \notsoshortintertext with two parameters to define the vertical space before and after it?

The problem I have is that \intertext is to wide on a specific page resulting in a poor page break. And with the \shorintertext I get an underfull vbox. So I would like to tune the vertical space at that point. I've tried to find the definition for \shortintertext, but wasn't able to understand the quite cryptic definition in the mathtools.dtx.

If no spacing is still too much, you can use negative spacing.

\documentclass{article}
\usepackage{mathtools}

\MHInternalSyntaxOn
\newcommand{\adjintertext}[3]% #1=above skip, #2=below skip, #3=text
{\ifvmode\else\\\@empty\fi
\noalign{%
%\penalty\postdisplaypenalty\vskip\belowdisplayskip
\vskip-\lineskiplimit      % CCS
\vskip\normallineskiplimit % CCS
\vskip#1
\vbox{\normalbaselines
\ifdim
\ifdim\@totalleftmargin=\z@
\linewidth
\else
-\maxdimen
\fi
=\columnwidth
\else \parshape\@ne \@totalleftmargin \linewidth
\fi
\noindent#3\par}%
%\penalty\predisplaypenalty\vskip\abovedisplayskip%
\vskip-\lineskiplimit      % CCS
\vskip\normallineskiplimit % CCS
\vskip#2
}}%
\MHInternalSyntaxOff

\begin{document}
\begin{align}
x &= a\\