In the following MWE, what is responsible for the large space before the align environment? How can I remove it (it doesn't appear if I change to \[
\]
and remove amsmath
) ?
\documentclass{article}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb}
\usepackage{lipsum}
\begin{document}
\setlength{\parskip}{0pt}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\lipsum*[2]
\lipsum*[2]
\begin{align*}1, 2, 3\end{align*}
\lipsum*[2]
\lipsum*[2]
\end{document}
I have read Spacing around align environments (but it doesn't cover the case in which there's a \par
before \align
and Remove vertical space around align (but it attributes the space to \parskip
, which seems wrong: setting \parskip
to 0 pt doesn't remove the space). I also read Remove extra vertical space in amsmath's align environment and Remove vertical space around align equations, but they just say that one shouldn't leave a \par
before an \align
. I'm curious to know what actually causes this blank space, even with all seemingly relevant lengths set to zero.
Edit for Reopen
Why does LaTeX insert space before formulas? is related, but it doesn't address the why: it says that leaving a blank line in the source causes the space but it doesn't say who is adding this space (and it's clearly an amsmath-specific
this: the regular displaymath
doesn't do that).
\parskip
+\baselineskip
.