127

I'm somewhat of a LaTeX noob, and this is driving me completely nuts.

When I type

\documentclass{article}
\usepackage{enumitem}

\begin{document}
    Some text
    \begin{itemize}[noitemsep]
        \item Item 1
        \item Item 2
        \item Item 3
    \end{itemize}
\end{document}

I don't want the space which appears in between the text "Some text" and the itemization to be there:

screenshot

When I search around on Google all I see is tons of long, complicated advice on this site, StackOverflow, forums, etc. on how to not fix the problem ("parskip is evil", etc.), or tons of vague/confusing answers on what package to look at, with no actual example for me to learn from.

So while this question is already asked many times, I have never found a single concrete answer to this question.

The question couldn't be simpler: How do I "properly" get rid of this extra space?

141

That space is governed by topsep. Set it to 0pt:

enter image description here

\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\noindent Some text
\begin{itemize}[noitemsep]
  \item Item 1
  \item Item 2
  \item Item 3
\end{itemize}
\bigskip\bigskip
Some text
\begin{itemize}[noitemsep,topsep=0pt]
  \item Item 1
  \item Item 2
  \item Item 3
\end{itemize}
\end{document}

To set this globally, use

\setlist[itemize]{noitemsep, topsep=0pt}

See section 5 Global settings (p 9) of the enumitem documentation for more details on this and perhaps creating your own list environment that has these predefined settings.

  • 1
    Bonus question: Do you happen to know if there's any way to change the default value for the whole document? :) – user541686 Dec 8 '12 at 3:32
  • @Mehrdad: I've added a reference to a global setting, specific to itemize. You can also create your own list with these settings, if need be. – Werner Dec 8 '12 at 3:39
  • @Mehrdad As Werner have mentioned, you can define a new environment say Itemize with \newenvironment{Itemize}{\begin{itemize}[noitemsep,topsep=0pt]}{\end{itemize}}. But I would go for Werner's solution. – hpesoj626 Dec 8 '12 at 3:48
  • 6
    Is this answer still valid? I didn't work for me. – piepi Feb 4 '18 at 5:33
  • 1
    @piepi: Yes. You must be doing something different. For example, using the beamer class (or something else). – Werner Feb 5 '18 at 16:15
10

The enumitem package now provides [nosep] to suppress the space above and below lists as well as the space between items. However, this option does not suppress the space above and below the list if you are also using the parskip package in your document.

  • 1
    This answer doesn't make sense... parskip doesn't provide a nosep option. – Werner Oct 13 '16 at 21:20
  • Are you meaning enumitem rather than parskip? But it's not a package option anyway. – egreg Oct 13 '16 at 21:27
  • Sorry, I was not as explicit as I should have been: the [nosep] option in the enumitem package does not work if you are also using the parskip package in the document. – Peter Flynn Oct 23 '16 at 21:17
  • 1
    So how do I suppress the space above and below lists if I am using parskip? – incandescentman Feb 14 '18 at 8:49
  • 1
    You have to do it manually: \kern-\parskip\begin{itemize} then your \items and then \end{itemize}\kern-\parskip. I am assuming there is a typographical reason why you want to do this: if you use parskip then you presumably expect space above and below lists. It looks a little weird having space between paragraphs but not before and after lists. – Peter Flynn Feb 15 '18 at 20:30
5

An alternative to this is to just use:

\usepackage{paralist}

And the compactitem environment:

\begin{compactitem} 
    \item This is entry number one, compact 
    \item This is entry number two, compact 
\end{compactitem}

to see more on this, check: Compact lists with paralist.

  • Can you please check the link, looks suspicious, it redirects me to a scam website – mohsen hs Sep 1 '19 at 4:20
  • Broken link indeed. You will have to Google "Compact lists paralist". – PLG Sep 2 '19 at 8:03
  • This is incompatible with beamer – Spen Sep 8 '19 at 13:52
3

In some cases you might need to add \nointerlineskip after an itemize environment to get rid of spacing below.

  • This makes the vertical spacing after the environment inconsistent. – Phelype Oleinik Apr 21 '19 at 11:45
  • 1
    This is the only thing that worked for me with beamer – Spen Sep 8 '19 at 13:53

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.