74
votes

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

4
Also try asking on tex.stackexchange.comShreevatsaR
mdwlist is a package you might want to look at.Seamus
Something similar came up not too long ago. Does the answer HERE help at all?Hendy

4 Answers

121
votes

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}
4
votes

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.

0
votes

In the preamble:

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

In the document:

\bbb{hello world}