23

I use the enumitem package to modify the amount of space related to lists. One of the options this package can easily modify is topsep. However, this variable controls the vertical space both before and after a list. I can manually add back some space after the list, but this is just a hack.

\documentclass{article}
\usepackage{enumitem}
\setlist{noitemsep}
\begin{document}
I like the lack of vertical space between the end of this paragraph and the beginning of the following list.

\begin{itemize}[topsep=0pt]
 \item Item 1
     \item Item 2
    \end{itemize}

I don't like the lack of vertical space between the end of the previous list and the beginning of this paragraph.

I don't like the lack of vertical space between the end of this paragraph and the beginning of the following list.

\begin{itemize}
 \item Item 1
 \item Item 2
    \end{itemize}

I like the vertical space between the end of the previous list and the beginning of this paragraph.

To get the best of both worlds,
I use a baseline skip after the list.

\begin{itemize}[topsep=0pt]
 \item Item 1
 \item Item 2
\end{itemize}
\vspace*{\baselineskip}

Now there is a good amount of space between the end of the previous list and the beginning of this paragraph,
but a bit too much and achieved via a ``hack''.
\end{document}

enter image description here

Question

How can I use this package to modify the amount of space before and after separately?

0

1 Answer 1

26

You can use before=<code> and / or after=<code> to put the space/some latex code. If you use

\setlist{nosep,after=\vspace{\baselineskip}}

we get

enter image description here

Code:

\documentclass{article}
\usepackage{enumitem}
\setlist{nosep,after=\vspace{\baselineskip}}
\begin{document}
I like the lack of vertical space between the end of this paragraph and the beginning of the following list.

\begin{itemize}
 \item Item 1
 \item Item 2
\end{itemize}

I don't like the lack of vertical space between the end of the previous list and the beginning of this paragraph.

I don't like the lack of vertical space between the end of this paragraph and the beginning of the following list.

\begin{itemize}
 \item Item 1
 \item Item 2
\end{itemize}

I like the vertical space between the end of the previous list and the beginning of this paragraph.

To get the best of both worlds,
I use a baseline skip after the list.

\begin{itemize}
 \item Item 1
 \item Item 2
\end{itemize}
%\vspace*{\baselineskip}

Now there is a good amount of space between the end of the previous list and the beginning of this paragraph,
but a bit too much and achieved via a ``hack''.
\end{document}

If you want to override this for one itemize environment, use

\begin{itemize}[after=]
4
  • 2
    Maybe \medskipamount or something like that would look better?
    – Bernard
    Sep 3, 2014 at 0:05
  • 1
    @Bernard True, but that is up to OP to choose.
    – user11232
    Sep 3, 2014 at 0:09
  • @Bernard I looked here for some standard/default amount of vertical space to add and \baselineskip seemed to work the best. Your \midskipamount seems to add less than the default amount of space. Do you have other suggestions? Preferably I would use the same commands that would have normally been used had nosep not been used. Sep 3, 2014 at 15:20
  • @Tyson Williams: actually I was unsure whether to propose \medskipamount or bigskipamount. But maybe it's connected to French typographical tradition, which is rather restrained as to vertical spacings, as you may know.
    – Bernard
    Sep 3, 2014 at 15:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .