1

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

\usepackage{amsmath}

\makeatletter
\g@addto@macro\normalsize{%
    \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....
\begin{equation}
    \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}}
\end{equation}
\begin{equation} 
    \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{equation}
Here I have more text..
4
  • 2
    Wouldn't it be better to use something like align in these circumstances? Dec 3, 2021 at 11:30
  • 2
    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
    – daleif
    Dec 3, 2021 at 11:31
  • 3
    As Ian mentions, use align or even gather. One should never ever have two equation envs right after each other
    – daleif
    Dec 3, 2021 at 11:31
  • thanks for your help!
    – Manuel
    Dec 4, 2021 at 14:37

1 Answer 1

2

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.

enter image description here

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

\begin{document}

\noindent\textcolor{red}{two consecutive \texttt{equation} environments}
\hrule
\begin{equation}
    \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}}
\end{equation}
\begin{equation} 
    \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{equation}
\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}
1
  • Thanks for your help!
    – Manuel
    Dec 4, 2021 at 14:37

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.