[Tex/LaTex] Why does \parskip add space after section headings inconsistently

parskipspacing

There are already several questions dealing with the extra vertical space after section headings that result from setting \parskip to a non-zero value.

Here, I just want to understand why extra space is added before normal paragraphs but not before lists. (I think this is a legitimate question and not a duplicate.)

As it can be seen in the picture below, there is extra space when the section starts with some text:

No parskip (left) vs parskip (right), paragraph

Yet no extra space when the section starts with an itemize:

No parskip (left) vs parskip (right), itemize

Here is the code I used:

\documentclass[11pt]{article}

\parskip=\smallskipamount

\usepackage{enumitem}

\newlist{compactlist}{itemize}{3}
\setlist[compactlist]{%
  label=\enskip\textbullet,
  partopsep=0pt,
  topsep=0pt,
  parsep=0pt,
}

\usepackage{blindtext}

\begin{document}
\section{Parskip}
%% \blindtext
\begin{compactlist}
  \item \blindtext
\end{compactlist}

\end{document}

Best Answer

\parskip is a TeX primitive which gets set to various values in LaTeX constructs, so setting it directly at the start of the document has a defined effect but possibly not as expected. In particular LaTeX lists manipulate \parskip to control the spacing before the list and between items, in particular before a list it is reset to values depending on \partopsep and \topsep.