How to Remove Space Around an Itemize List in a Table
At a glance
- 1. Use a Paragraph Column
Put the list in a p, m, or other paragraph-type column so the cell can contain paragraphs.
- 2. Suppress List Spacing
Add enumitem’s nosep option to the itemize environment to zero the list’s vertical and paragraph spacing.
- 3. Check the Row Height
If a gap remains, inspect the table’s row strut; list settings do not remove the table’s built-in row height.
To remove the whitespace immediately above and below an itemize list in a table cell, use the enumitem package’s nosep option. The cell must be able to contain paragraph text, so use a p{...} column (or another paragraph-type column) rather than an ordinary l, c, or r column.
Minimal working example
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{tabular}{|p{2.5cm}|p{8cm}|}
\hline
Topic & Details \\
\hline
Fruits &
\begin{itemize}[nosep]
\item Apples
\item Pears
\item Plums
\end{itemize}
\\
\hline
\end{tabular}
\end{document}
The enumitem package defines nosep as a compact-list setting: it removes the list’s vertical spacing, including the space at the beginning and end of the list and the gaps between items. This is usually the simplest choice when the goal is to make the whole list as tight as possible.
If you want to remove only the space around the list but keep some separation between items, set the list parameters individually:
\begin{itemize}[topsep=0pt,partopsep=0pt]
\item Apples
\item Pears
\end{itemize}
topsep controls space above and below the list. partopsep is additional space that can be added when the list starts a new paragraph. Leaving itemsep and parsep unchanged preserves the corresponding spacing between items and paragraphs within items.
Apply the setting to every itemize list
If you want compact spacing for all itemize environments in the document, set the option once in the preamble:
\usepackage{enumitem}
\setlist[itemize]{nosep}
Use the option on a specific environment instead when you want other lists to retain their normal spacing.
If a gap remains
A table row has its own height, partly determined by the row strut LaTeX inserts to keep rows from being too cramped. nosep changes the list’s spacing; it does not remove that table-level height. If the remaining gap appears around other cell contents too, it is likely due to the row strut rather than itemize.
You can reduce the row height for a table by lowering \arraystretch, for example:
{\renewcommand{\arraystretch}{0.9}%
\begin{tabular}{|p{2.5cm}|p{8cm}|}
% rows go here
\end{tabular}}
The braces limit the change to that table. Use this carefully: reducing \arraystretch affects every row in the table and can make text or rules look cramped. It is not a substitute for setting the list spacing.
Common mistakes
- Using
l,c, orrfor the list cell. These columns do not create a paragraph box for the list. Usep{...}, or define a paragraph-type column with a package such asarray. - Changing
\tabcolsepto fix vertical whitespace.\tabcolsepcontrols horizontal padding between columns, not the spacing above and below a list. - Adding negative
\vspaceas the first fix. Negative space can make the table look uneven or cause content to collide. First remove the list’s own spacing withnosep, then adjust the row height only if necessary.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.