85

I am trying to build a very compact itemize with LaTeX, because I want to fit it in a table without whitespace everywhere.

What I need:

  • No whitespace before list
  • No whitespace after list
  • No whitespace between lines
  • Less indent before the bulletpoints

I have tried many packages (paralist, mdwlist, enumitem) but non of them can fully do it.

I tried it myself (with the help of paralist) and could get rid of everything except the whitespace after the list. This is my current solution:

\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother

\newenvironment{ilist}%
  {
    %from parlist package, reduces indent before bulletpoints
    \setdefaultleftmargin{1em}{1em}{}{}{}{} 
    \compress %places itemize into minipage, removing whitespace before
    \begin{itemize}%
    \setlength{\itemsep}{0pt}%
    \setlength{\topsep}{0pt} 
    \setlength{\partopsep}{0pt}
    \setlength{\parsep}{0pt}
    \setlength{\parskip}{0pt}}%
  {\end{itemize}}

However, I am unable to get rid of the space after the list. I can do it with a negative vspace but this is:

  1. Ugly
  2. Does not work for tables: The rule after the row in which the list is will still be one line below.

Can anyone tell me how to do it? I have googled so much, but it somehow seems that I am the first human that ever tried to insert an itemize into a table :D

Kim
  • 4,080
  • 2
  • 30
  • 51
gex
  • 891
  • 1
  • 7
  • 5

6 Answers6

132

To change these settings globally

\usepackage{enumitem}
\setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}

(And you can use the \setenumerate, \setdescription or \setlist commands for other types of lists)

Or for just a single list

\usepackage{enumitem}
...
\begin{itemize}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
\item item 1
\item item 2
\item item 3
\end{itemize}
Ken Bloom
  • 57,498
  • 14
  • 111
  • 168
  • 24
    `\setlist{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}` (instead of `\setitemize...`) to set the same global options for all three kinds of lists (`itemize`, `enumerate` and `description`) – Markus Pscheidt Apr 30 '12 at 14:37
  • 12
    I think I need `leftmargin=*` as another argument? For "very" compact". :) – Brady Trainor Nov 19 '14 at 22:37
  • 4
    You can add this to you commands: `\usepackage{enumitem} \newenvironment{compitemize} {\begin{itemize}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]} {\end{itemize}}` and then use \begin{compitemize} where needed – user3265569 Mar 06 '19 at 10:42
  • 2
    `enumitem` conflicts with beamer. We should use this answer: https://tex.stackexchange.com/questions/5941/changing-left-margin-in-itemize-environment-of-beamer-class – Yan King Yin Aug 30 '19 at 13:19
6

The accepted answer is not up to date as mentioned in the comments. This is what I used to get a compact list:

\usepackage{enumitem}
\setlist{topsep=0pt, leftmargin=*}

Then use \begin{itemize} as usual to start a list.

stefanbschneider
  • 5,460
  • 8
  • 50
  • 88
2

Try the enumitem and shortlst packages.

Matthew Leingang
  • 2,579
  • 3
  • 20
  • 19
  • 5
    Also [`paralist`](http://ctan.org/pkg/paralist) and in particular the `compactitem` list style. – Damien Pollet Feb 11 '11 at 14:38
  • 1
    can you tell me how? I already experimented with enumitem but didn't make it. A working snipped would be very helpful, not only for me but others having this problem. – gex Feb 11 '11 at 16:48
  • @gex: see @Ken Bloom's answer for `enumitem.` For `shortlst`, RTM. And I second the recommendation for the [TeX SE](http://tex.stackexchange.com/) – Matthew Leingang Feb 14 '11 at 12:46
1

This solution was provided in a comment by @damien-pollet but every time I come back here to find it again, I always have a hard time finding it because it is a comment, so I am putting it as answer for the benefit of my future-self who will be looking for this answer again.

The compactitem environment of the paralist package works wonders:

\usepackage{paralist}
...
\begin{compactitem}
\item Item 1
\item Item 2
\end{compactitem}
patapouf_ai
  • 17,605
  • 13
  • 92
  • 132
1

You get the desired layout with the savetrees package (caveat: this will also compactify the rest of your document)

\documentclass{article}

\usepackage{savetrees}

\begin{document}
text
\begin{itemize}
\item No whitespace before list
\item No whitespace after list
\item No whitespace between lines
\item Less indent before the bulletpoints
\end{itemize}
text
\end{document}

enter image description here

-1

In the preamble:

\newcommand{\bbb}[1]{\indent$\bullet$ #1\\}

In the document:

\bbb{hello world}
Bo Persson
  • 90,663
  • 31
  • 146
  • 203