0

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{equation}
    \begin{split}
      A &= B \\
      C &= D
    \end{split}
    %% \label{eq:<<>>}%
  \end{equation}
\end{linenomath}
%
B
%
\begin{linenomath}
  \begin{equation}
    \left. \begin{split}
      A &= B \\
      C &= D
    \end{split} \right.
    %% \label{eq:<<>>}%
  \end{equation}
\end{linenomath}
%
C, Test test test test test test test test test
%
\begin{linenomath}
  \begin{equation}
    \begin{split}
      A &= B \\
      C &= D
    \end{split}
    %% \label{eq:<<>>}%
  \end{equation}
\end{linenomath}
%
D, Test test test test test test test test test
%
\begin{linenomath}
  \begin{equation}
    \left. \begin{split}
      A &= B \\
      C &= D
    \end{split} \right.
    %% \label{eq:<<>>}%
  \end{equation}
\end{linenomath}
%
E, Test test test test test test test test test
\end{document}
%%---

MWE output

2

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:

The split structure should constitute the entire body of the enclosing structure, apart from commands like \label that produce no visible material.

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.

  • Thank you David. I'd seen that line from amsldoc.pdf, but did not understand why the \nulldelimiterspace changed the behaviour (since it produces "no visible material"), I shall chalk it up as a side-effect and move things over to use aligned everywhere. – Andy Feb 18 '18 at 1:28
  • @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 – David Carlisle Feb 18 '18 at 9:16

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.