[Tex/LaTex] Change \parskip around itemize environment

itemizelistsparskip

I want to have a non-zero \parskip between the paragraphs, but avoid having it around the "inline" itemize.

I could temporarily change it around each environment, but I have a lot of them in my document. I could also redefine the itemize environment and introduce a \vspace*{-\parskip}, but I'd prefer a cleaner way. Changing \parskip inside the environment is useless as it only works inside the group.

\documentclass{article}
\begin{document}
\parskip=6pt
Praesent hendrerit velit at magna tempus, at malesuada augue lacinia. Pellentesque at malesuada est, vel varius enim. In egestas massa et finibus ultricies. Donec felis erat, placerat et sodales in, egestas non mi.

% >> parskip here!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
% >> no parskip here
\begin{itemize}
  \item first
  \item second
\end{itemize}
% >> no parskip here
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

% >> parskip here!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\end{document}

Packages like paralist and enumitem did not seem to solve the problem in presence of \parskip.

Best Answer

latex uses \topsep as the local version of \parskip in that context so just set \parsep to whatever you need, however if setting without using enumitem or similar package you need to set it indirectly as article sets up each first level list using a predefined set of parameters.

\documentclass{article}
\setlength\parskip{6pt}

\makeatletter
\def\@listI{\leftmargin\leftmargini
            \parsep 4\p@ \@plus2\p@ \@minus\p@
%            \topsep 8\p@ \@plus2\p@ \@minus4\p@
            \topsep\z@
            \itemsep4\p@ \@plus2\p@ \@minus\p@}
\makeatother
\begin{document}

Praesent hendrerit velit at magna tempus, at malesuada augue lacinia. Pellentesque at malesuada est, vel varius enim. In egestas massa et finibus ultricies. Donec felis erat, placerat et sodales in, egestas non mi.

% >> parskip here!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
% >> no parskip here
\begin{itemize}
  \item first
  \item second
\end{itemize}
% >> no parskip here
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

% >> parskip here!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\end{document}

or perhaps you want

            \topsep-6pt

depending how tight you want the spacing.