# How do I set the distance between equations to be equal to the distance to the surrounding text?

I would like to display a set of equations divided into subsets, where the spacing between two subsets is the same as between the first line and the text above (and between the last line and the text below). If I use the align environment multiple times after each other, then the equations get aligned within each subset in the way I want, but the spacing between the subsets of equations is too big. If I write all equations within the same environment, align or gather or similar, then the spacing is too small, and the division into subsets and the alignment within each subset gets lost. Does anyone have a solution to this problem?

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}
\begin{document}
I would like this, but with the spacing between (2) and (3) equal to the spacing between (1) and this line of text.
\begin{align}
1+1&=2 & 2+2&=4 & 3+3&=6\\
4+4&=8 & 5+5&=10 & 6+6&=12
\end{align}
\begin{align}
1-1=2-2=3-3=4-4=5-5=6-6=0
\end{align}
Or between (3) and this line of text.
\end{document}


• Welcome to TeX.SE.
– Mico
Jun 28, 2023 at 12:38
• align can be used within gather, for just this reason. (This should be mentioned in the amsmath user guide.) Aug 31, 2023 at 17:03

You can locally remove the vertical space above (3) (which should be equation)

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}

\begin{document}

I would like this, but with the spacing between (2) and (3) equal to
the spacing between (1) and this line of text.
\begin{align}
1+1&=2 & 2+2&=4 & 3+3&=6\\
4+4&=8 & 5+5&=10 & 6+6&=12
\end{align}
\begingroup
\setlength{\abovedisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
$$1-1=2-2=3-3=4-4=5-5=6-6=0$$
\endgroup
Or between (3) and this line of text.

\end{document}


Alternatively, but beware that using \label inside align is broken, nest align in gather; on the plus side, this won't allow a page break between the two parts.

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}

\begin{document}

I would like this, but with the spacing between (2) and (3) equal to
the spacing between (1) and this line of text.
\begin{gather}
\begin{align}
1+1&=2 & 2+2&=4 & 3+3&=6\\
4+4&=8 & 5+5&=10 & 6+6&=12
\end{align}
\\[\dimexpr\abovedisplayskip-\jot\relax]
1-1=2-2=3-3=4-4=5-5=6-6=0
\end{gather}
Or between (3) and this line of text.

\end{document}

• Just \\  is enough after the align. You don't need to mess around with resetting the separation -- gather takes care of that. (You really should add the image of the output.) Jun 28, 2023 at 19:30
• @barbarabeeton The OP wanted more space between the two blocks. The image is essentially the same as the one after the first answer. Jun 28, 2023 at 19:43
• Okay. (I got lost in the description.) But it's definitely true that putting everything within a single gatheris preferable to two separate display environments. Jun 29, 2023 at 0:01
• Thanks, and sorry for not being clear! I wanted less space between the two blocks than in my example, and I wanted align as my second environment. I realise that it was a bad example, since I did not really use the features of align in (3), but suppose (3) was another block of equations, but with only two columns. How would gather help me? Jul 7, 2023 at 17:01
• @Jakob Sorry, but I don't understand. Please, open a new question with some better indication of what you want. Don't be generic. Jul 7, 2023 at 17:26

You could use \mathclap (mathtools package) to overlap the other "columns", although technically it will be centered relative to the middle &=. You can use \\[...] to change the vertical spacing.

\documentclass[a4paper,11pt]{article}
\usepackage{mathtools}
\begin{document}
I would like this, but with the spacing between (2) and (3) equal to the spacing between (1) and this line of text.
\begin{align}
1+1&=2 & 2+2&=4 & 3+3&=6\\
4+4&=8 & 5+5&=10 & 6+6&=12\\[\abovedisplayskip]
&&& \mathclap{1-1=2-2=3-3=4-4=5-5=6-6=0} &&
\end{align}
Or between (3) and this line of text.
\end{document}


Edit: in the first attempt it seems that I misunderstood question. Now is corrected_ Like this:

\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}
\begin{document}
I would like this, but with the spacing between (2) and (3) equal to the spacing between (1) and this line of text.
\begin{align}
1+1&=2 & 2+2&=4 & 3+3&=6\\
4+4&=8 & 5+5&=10 & 6+6&=12
\end{align}\vspace{-\abovedisplayskip}%
$$1-1=2-2=3-3=4-4=5-5=6-6=0$$
Or between (3) and this line of text.
\end{document}
`
• @Teepeemm, yes, it is. I understand that is what OP like to have. But seems, that I'm wrong. Jun 28, 2023 at 13:28
• Thanks, and sorry for not being clear. However, it seems that adding "\vspace{-\abovedisplayskip}" increases the space between the two blocks, but I wanted to decrease it. With "equation" as the second environment it is almost fine already without adding anything, but I wanted to use the features of "align" also for the second block. But then I get too much space between the two align environments. Jul 7, 2023 at 16:48
• @Jakob, but my answer decrease this distance! Now the space between equation system and last equation below it is the same as is between text and equations. Sorry, but now is not clear what you after ... Jul 7, 2023 at 17:47