# How to fix the vertical spacing above and under equations?

I'm having problems with vertical spacing above and under equations and I don't know what to do anymore. Here's a MWE that reproduces my problem (I wasn't able to make a simpler version in English, so sorry for the French stuff but that's irrelevant!):

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}
\raggedbottom
\usepackage{microtype}

\begin{document}

%\setlength{\abovedisplayskip}{11pt}
%\setlength{\abovedisplayshortskip}{0pt}
%\setlength{\belowdisplayskip}{\abovedisplayskip}
%\setlength{\belowdisplayshortskip}{\abovedisplayskip}
\setlength{\jot}{3ex}

Sans chercher à être rigoureux, il vaut la peine de montrer que l'égalité entre les deux potentiels a lieu sous la limite thermodynamique (nombre très grand).  Pour les systèmes possédant un très grand nombre de particules, la série doit être dominée par un terme beaucoup plus grand que les autres, que l'on peut supposer centré (ceci n'est justifié que si l'écart relatif est suffisamment faible).  Le maximum de la fonction
$$\mu = \frac{\partial \Phi}{\partial N} = -\, x.$$
est obtenu en annulant sa dérivée par rapport à la variable évaluée en $N = \bar{N}$ (cette variable discrète peut être considérée comme une variable continue pour ses très grandes valeurs).  Ceci donne
$$\mu = \frac{\partial \Phi}{\partial N} = -\, x.$$
Puisque le nombre est susceptible de fluctuer autour de sa valeur moyenne, on peut développer la fonction en une série de puissance.  Au second ordre, on obtient bla blabla blaaaaa!

\end{document}


Here's a preview of my vertical spacing problem:

As you can see on this picture, the vertical spacing above and under equations is variable. I hate that! I want a perfectly constant spacing for all equations, above and under the text. When I comment out the \setlength commands in this MWE, I could get a much better display, but still it isn't perfect. Depending on the text and equations, I may get some variable spacing. So I have two questions:

1. How can I absolutly fix the vertical spacing above and under each equation?

2. What should be a natural spacing value? I used 8pt in that MWE example, but it needs to be scalable if I decide to change the global font size. I don't know what should be the proper space.

Please, take note that I'm not asking about the shortskip of equation (2) in this example, which is fine. Just see the three thin vertical red lines I've draw on the picture.

• You forget there are optical illusions. Your equation (2) use \abovedisplayshortskip because the line above the equation is very short, so that it is the last but one line above which is important to the eye. If you use \abovedisplay skip w.r.t. the last line, the spacing w.r.t. the previous line will be too large. Dec 9 '19 at 23:06
• @Bernard, I'm not talking about the shortskip, which is natural here. This isn't what I want to change. Just see the vertical red lines I've drawn in my preview picture.
– Cham
Dec 9 '19 at 23:08
– cfr
Dec 9 '19 at 23:09
• @cfr, it wasn't about the same thing! This discussion was about the vertical spacing inside the math environments, especially the align and gather environments. The question above isn't about that at all.
– Cham
Dec 9 '19 at 23:11
• @Schrödinger'scat, I've understood the meow. +1 there! Purr purr!
– Cham
Dec 9 '19 at 23:21

With the new uploaded image the two lengths marked by the arrow differ because of user settings. The first is based on \belowdisplayskip and the second (as the line above the display is short) uses \belowdisplayshortskip. If you want the spaces to be equal just set these to the same value, eg

\setlength\belowdisplayshortskip{\belowdisplayskip}


would make them both use the value from the first equation.

• This appears to work. Maybe this is unrelated, but I'm still having too large vertical space between small equations under the align environment. How can I reduce localy the spacing (i.e from withinn an environment), without changing the global \jot defined in the preamble ? Is \[negative space] the only option?
– Cham
Dec 10 '19 at 15:02
• @Cham align always uses \abovedisplayskip not \abovedisplayshortskip (one package I forget nccmath or mathtools I think) has a user-level command to switch one equation to use the short setting Dec 10 '19 at 15:06
• I consulted the nccmath and mathtools documentation to find the vertical commands in maths environments and din't found the one that let the user to change the inter equations spacing. I still don't see how to change the spacing without using a negative space with \[...].
– Cham
Dec 10 '19 at 15:21
• Ha! I think I've found it. Using \begingroup\setlength{\jot}{2ex} ... \endgroup solves my spacing issue for the few cases where I need to reduce the space. Do you confirm this is a proper solution?
– Cham
Dec 10 '19 at 17:29