[Tex/LaTex] Increasing vertical space after equation in paragraph with short previous line

equationsmath-modespacing

The problem

I'm aware that LaTeX the spacing around equations in a paragraph differs depending on how long the line of the paragraph immediately preceding the equation is. When the preceding line is short, there's less vertical space before the equation, because the text of the equation will actually be below the empty part of the line. Thus, in plain text, we get something like:

  The quick brown fox jumps over the
lazy dog. The quick brown fox jumps.
                                       ; blank line before equation
              F = ma

  The quick brown fox jumps over the
lazy dog.                              ; no blank line before equation
              F = ma

That makes sense to me, but it seems that in the former case, the amount of space "looks" about the same, whereas in the latter case, the amount of space below the equation "looks" smaller. A screenshot and code for a minimal example follow.

Where is this behavior specified or documented, and what can I do to adjust it? In the minimal example, the difference doesn't really look bad, but it is noticeable, and in a document I'm working on it's very noticeable and doesn't look all that great. That document has a lot of non-minimal stuff (a package tree-style proofs that need to be wrapped in \vcenter, and double spacing), but I'm hoping that I can resolve this based on the example here.

Minimal working example

vertical spacing around equations

\documentclass{article}

\begin{document}

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the.
\begin{equation}
  \frac{a}{b}
\end{equation}
The paragraph continues here.
The paragraph continues here.
The paragraph continues here.

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the.
\begin{equation}
  \frac{a}{b}
\end{equation}
The paragraph continues here.
The paragraph continues here.
The paragraph continues here.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the.

The paragraph continues here.
The paragraph continues here.
The paragraph continues here.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.

\end{document}

Illustration of the real, but non-minimal, problem

illustration of the real, non-minimal problem

Best Answer

You seem to want that \belowdisplayshortskip is set equal to \belowdisplayskip; the former is used if the line above the display is “short”. The parameters are set in \normalsize (and also in \small and \footnotesize). Just append the appropriate declaration.

\documentclass{article}
\usepackage{etoolbox}
\appto\normalsize{\belowdisplayshortskip=\belowdisplayskip}
% the following two are not strictly necessary
\appto\small{\belowdisplayshortskip=\belowdisplayskip}
\appto\footnotesize{\belowdisplayshortskip=\belowdisplayskip}

\begin{document}

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the.
\begin{equation}
  \frac{a}{b}
\end{equation}
The paragraph continues here.
The paragraph continues here.
The paragraph continues here.

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps.
\begin{equation}
  \frac{a}{b}
\end{equation}
The paragraph continues here.
The paragraph continues here.
The paragraph continues here.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the.

\end{document}

enter image description here