[Tex/LaTex] Vertical space in lists

listsspacing

What is the best way to change the amount of vertical space between items in list environments (globally or locally)?

Best Answer

The easiest way to do this is to use the enumitem package.

\documentclass{article}
\usepackage{lipsum} % for dummy text
\usepackage{enumitem}
\setlist{nosep} % or \setlist{noitemsep} to leave space around whole list

\begin{document}
\lipsum[1]
\begin{enumerate}
\item foo
\item bar
\end{enumerate}
\lipsum[2]
\end{document}

The enumitem package also allows you to set the list spacing for a particular type or level of list, or for any particular individual list:

\setlist[2]{noitemsep} % sets the itemsep and parsep for all level two lists to 0
\setenumerate{noitemsep} % sets no itemsep for enumerate lists only
\begin{enumerate}[noitemsep] % sets no itemsep for just this list
...
\end{enumerate}

The nosep parameter removes all vertical spacing within and around the list; the noitemsep parameter removes spacing from items but leaves space around the whole list.

You can also set any of the spacing parameters to exact values, either globally (using \setlist) or locally, using the optional argument [...] after the beginning of the environment:

\begin{itemize}[topsep=8pt,itemsep=4pt,partopsep=4pt, parsep=4pt]
\item Some text
\item Some text
\end{itemize}

To see how all of these parameters work, see the following question:

The package also allows complete control over all other aspects of the list formatting too.