# Space between paragraphs, no space between paragraph and list

I would like to set 0.5\baselineskip space between paragraphs, but no space between paragraph and list. Setting \setlength{\parskip}{0.5\baselineskip} adds unnecessary space between paragraph and list:

I tried to \setlist{itemsep=0pt,topsep=0pt,parsep=0pt,partopsep=0pt} with enumitem package without any success.

• the default list environment (nice picture on p.145 of the latex companion) separates the preceding text from the list by \topsep + \parskip + \partopsep, so you'll need to suppress that particular \parskip. – barbara beeton Sep 23 '16 at 14:47
• @barbarabeeton So you actually do need to cut it since it's added up anyways... That's very good insight! Thanks. – Guilherme Zanotelli Sep 23 '16 at 14:49

You can obtain what you want with etoolbox:

\documentclass{article}
\usepackage{enumitem,lipsum}
\setlength{\parskip}{0.5\baselineskip}
\usepackage{etoolbox}
\AtBeginEnvironment{itemize}{\setlength\parskip{0pt}}
\AfterEndEnvironment{itemize}{\vspace*{-\dimexpr\parskip\relax}}

\begin{document}

\lipsum[1-2]

\begin{itemize}[label=\textendash,  nosep]
\item Some text to fill this part
\item Some text to fill this part
\item Some text to fill this part
\item Some text to fill this part
\end{itemize}

\lipsum[3-4]

\end{document}


You can get rid of it with a \newenvironment (there probably is a better solution):

\documentclass{article}
\usepackage{enumitem,lipsum}
\setlength{\parskip}{0.5\baselineskip}

\newenvironment{itemizezerosep}{\vspace{-\parskip}
\begin{itemize}[label={--},
topsep=0pt,
parsep=0pt,
partopsep=0pt]
}
{\end{itemize}}

\begin{document}
\lipsum[1-2]

\begin{itemizezerosep}
\item Some text to fill this part
\item Some text to fill this part
\item Some text to fill this part
\item Some text to fill this part
\end{itemizezerosep}

\lipsum[3]
\end{document}


Since you said you only want to remove the space before the list. If you to remove after as well, just add the \vspace{-\parskip} after the \end{itemize}.

EDIT

As explained by David Carlisle on the comments below, one should use \vspace without * so that if by any chance the list is located after a pagebreak (at the top of the page) the space won't be removed and the list will be aligned properly.

• you don't want vspace* as that will not be removed at the top of a page (but the space that you are backing over will have been dropped) – David Carlisle Sep 23 '16 at 15:01
• Hmm, I don't understand clearly the mechanism behind. My experience was that \vspace* always removes the space and without * depends on the contents. Feel free to edit the answer and explain to us mortals... ;D – Guilherme Zanotelli Sep 23 '16 at 17:21
• the only (documented) difference between vspace* and vspace is tthat the * form will make a space at the top of a page, but here you do not want negative space at the top of the page or your list will over-print the page head. You just want to negative space if the preceding paragraph space is there, which it will not be at a page break. – David Carlisle Sep 23 '16 at 17:24

Thanks to Bernard, barbara beeton and enumitem package documentation I finally figured out how to obtain this behavior with enumitem:

\documentclass{article}
\usepackage{enumitem}
\setlength{\parskip}{0.5\baselineskip}

\begin{document}
Изучив предложенный курс, обучающийся должен обладать следующими
навыками:

\begin{itemize}[before=\setlength\parskip{0pt}]
\item правильно оценивать свойства стали;
\item правильно выбирать оптимальное решение конструкций;
\item рационально и экономно проектировать стальные конструкции.
\end{itemize}

Изучению курса металлических конструкций должно предшествовать
изучение следующих дисциплин: технология металлов и сварки;
сопротивление материалов; строительная механика; архитектура
промышленных и гражданских зданий.

\end{document}