2

I often type

 \itemsep1pt \parskip0pt \parsep0pt

after every instance of

\begin{enumerate}

to adhere to the spacing of the rest of the document. How can I define a new environment that keeps all of the enumerate options available but has the default spacing set to what I have written above?

  • 1
    Welcome to TeX.SX! You can use the enumitem package and its \setlist command. – user31729 Mar 23 '16 at 0:27
  • Welcome to TeX.SX!! It is better to post a full minimal working example that starts with a \documentclass command, has a minimal preamble and then \begin{document}...\end{document}. Unless the problem is a compilation error, the code should compile and be as small as possible to demonstrate your problem. This makes it much easier for people to help you --- and much more likely that they will! – Andrew Mar 23 '16 at 0:28
5

The enumitem package allows to change itemsep and other values in a \setlist command.

However, \parskip is no list-specific length, it has to be modified within the before={...} option, this is a code - hook for enumerate.

Please note, that \setlist[enumerate]{...} will change the values for all levels of enumerate. If a specific level is to be set, use \setlist[enumerate,1]{...}, e.g. for the 1st level.

\documentclass{article}


\usepackage{enumitem}

\setlist[enumerate]{itemsep=1pt,parsep=0pt,before={\parskip=0pt}}

\begin{document}

Foo
\begin{enumerate}
\item Foo
\item Stuff
\item Foobar
\item Other Stuff
\end{enumerate}

After enumerate

And a new line

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.