# Vertical spacing between text and equation/split

I have been trying to play around with the inner' environments from the amsmath package (aligned, alignedat, gathered, and split) and am confused by the behaviour of the split environment with respect to the vertical spacing between the text and the contents of and equation environment.

Why does the MWE put a large space between line 1 and (1), and not between line 2 and (2)? I’m assuming that the big gap is something to do with split not understanding the difference between \abovedisplayskip and \abovedisplayshortskip but I don’t understand how/why my hack in the second equation works around the problem.

MWE and my example output below...

Thanks, Andy.

\documentclass{article}

%%---
\usepackage{amsmath}
\usepackage{mathtools}

\usepackage{lineno}
%%---

%%---
\linenumbers
\setrunninglinenumbers
%%---

%%---
\begin{document}
\noindent A
%
\begin{linenomath}
$$\begin{split} A &= B \\ C &= D \end{split} %% \label{eq:<<>>}%$$
\end{linenomath}
%
B
%
\begin{linenomath}
$$\left. \begin{split} A &= B \\ C &= D \end{split} \right. %% \label{eq:<<>>}%$$
\end{linenomath}
%
C, Test test test test test test test test test
%
\begin{linenomath}
$$\begin{split} A &= B \\ C &= D \end{split} %% \label{eq:<<>>}%$$
\end{linenomath}
%
D, Test test test test test test test test test
%
\begin{linenomath}
$$\left. \begin{split} A &= B \\ C &= D \end{split} \right. %% \label{eq:<<>>}%$$
\end{linenomath}
%
E, Test test test test test test test test test
\end{document}
%%---


split essentially always makes a "full width" construct so the short display skip is never used (it is similar to align in this respect).
The documented use is that split should constitute everything on the line except an optional \label. amsldoc says:
so the use with \left..\right is invalid really and stops split working as intended, as a side effect it boxes the alignment to its natural size and so allows shortdisplayskip to be used as the equation is seen to be sufficiently small. A better way to get this effect is to use aligned rather than split.
• @Andy "no visible material" means "does not affect the layout of the equation", so the space is "visible" but more importantly even if you set that space to 0, left-right is like \mbox{}` it adds an extra layer of box nesting and forces all glue to be set to its natural length Feb 18 '18 at 9:16