Space between text and equations

I am trying to increase space between text and equations, and following other threads I am using the commands:

\usepackage{amsmath}

\makeatletter
\setlength\abovedisplayskip{15pt}
\setlength\belowdisplayskip{15pt}
\setlength\abovedisplayshortskip{15pt}
\setlength\belowdisplayshortskip{15pt}
}
\makeatother


However, when I have two consecutive equations, this code increases the space between the two equations by more than between equations and text (above and below). I would like to obtain the opposite effect, a smaller space between equations and a bigger space between text and equations (above and below). Do you have any suggestions for that? (below my code).

Thanks a lot

Here I have some text....
$$\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} - \frac{\chi}{(1+\psi)} \left[z_{i t}^{1+\psi} - (1+\psi) z_{i t}^{1+\psi}\right]+(1-\delta) E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}$$
$$\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} +\frac{\psi \chi}{(1+\psi)} z_{i t}^{1+\psi}+(1-\delta) E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}$$
Here I have more text..

• Wouldn't it be better to use something like align in these circumstances? Dec 3, 2021 at 11:30
• As always on this cite, please always provide full minimal examples, not these sniplets that we have to add to in order to even test Dec 3, 2021 at 11:31
• As Ian mentions, use align or even gather. One should never ever have two equation envs right after each other Dec 3, 2021 at 11:31
• thanks for your help! Dec 4, 2021 at 14:37

Since you are loading the amsmath package, you might as well make use of its multi-line display-equation environments, such as the gather and align environments. This will solve the inter-equation spacing issue automatically.

Given that the lower equation appears to be a simple transformation of the upper one, an align environment is likely appropriate here, with alignment performed on the = symbols.

The horizontal lines in the following screenshot are there to mark the start and end of the respective display-equation material.

\documentclass{article}
\usepackage{geometry} % set page parameters suitably
\usepackage{amsmath,xcolor}
\DeclareMathOperator{\E}{E} % expectations operator
\makeatletter
\setlength\abovedisplayskip{15pt}
\setlength\belowdisplayskip{15pt}
\setlength\abovedisplayshortskip{15pt}
\setlength\belowdisplayshortskip{15pt}
}
\makeatother

\begin{document}

\noindent\textcolor{red}{two consecutive \texttt{equation} environments}
\hrule
$$\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} - \frac{\chi}{(1+\psi)} \left[z_{i t}^{1+\psi} - (1+\psi) z_{i t}^{1+\psi}\right]+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}$$
$$\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} +\frac{\psi \chi}{(1+\psi)} z_{i t}^{1+\psi}+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}$$
\hrule

\bigskip
\noindent\textcolor{red}{single \texttt{gather} environment}
\hrule
\begin{gather}
\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} - \frac{\chi}{(1+\psi)} \left[z_{i t}^{1+\psi} - (1+\psi) z_{i t}^{1+\psi}\right]+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}} \\$$\frac{\partial J_{i t}}{\partial n_{i t}}=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} +\frac{\psi \chi}{(1+\psi)} z_{i t}^{1+\psi}+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}$$\end{gather}
\hrule

\bigskip
\noindent\textcolor{red}{single \texttt{align} environment}
\hrule
\begin{align}
\frac{\partial J_{i t}}{\partial n_{i t}}
&=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} - \frac{\chi}{(1+\psi)} \left[z_{i t}^{1+\psi} - (1+\psi) z_{i t}^{1+\psi}\right]+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}} \\
%\frac{\partial J_{i t}}{\partial n_{i t}}
&=\varphi_{t}a_{t} h_{i t}-\frac{W_{i t}}{P_{t}} +\frac{\psi \chi}{(1+\psi)} z_{i t}^{1+\psi}+(1-\delta) \E_{t} \beta_{t, t+1} \frac{\partial J_{i t+1}}{\partial n_{i t+1}}
\end{align}
\hrule

\end{document}

• Thanks for your help! Dec 4, 2021 at 14:37