How to Remove Itemize Spacing in a LaTeX Table
At a glance
- 1. Use a paragraph column
Put the list in a p, m, or b column so the table cell can contain paragraphs.
- 2. Set list spacing
Use topsep=0pt and partopsep=0pt to remove space above and below the list.
- 3. Tighten the whole list
Add itemsep=0pt and parsep=0pt too, or use enumitem's nosep option.
- 4. Check table padding
If gaps remain, adjust row height separately; table struts are not list spacing.
To remove the extra vertical space around an itemize list in a table cell, adjust the list spacing with the enumitem package. The options apply to that list only, so they do not change lists elsewhere in your document.
The list must be in a paragraph-capable table column. A p{...} column works with standard LaTeX; m{...} and b{...} columns are also suitable when you load the array package.
Remove only the space above and below
Set topsep=0pt and partopsep=0pt on the list:
\begin{itemize}[topsep=0pt, partopsep=0pt]
\item First item
\item Second item
\end{itemize}
topsep controls the space before and after a list. partopsep is additional space that can be added when a list begins a new paragraph. Setting both to zero targets the top and bottom spacing while leaving the spacing between items unchanged.
Complete example
This minimal document places a compact list in the second column of a table:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{tabular}{|l|p{6cm}|}
\hline
Category & Details \\
\hline
Fruit &
\begin{itemize}[topsep=0pt, partopsep=0pt]
\item Apples
\item Pears
\end{itemize} \\
\hline
\end{tabular}
\end{document}
The p{6cm} column allows paragraph content, which a list needs. The enumitem package makes the list options available. In this example, only the top and bottom space are removed; the default separation between the two items remains.
Make the list fully compact
If you also want to remove space between items and between paragraphs within an item, set all four list lengths to zero:
\begin{itemize}[
topsep=0pt,
partopsep=0pt,
itemsep=0pt,
parsep=0pt
]
\item First item
\item Second item
\end{itemize}
For this fully compact case, enumitem provides the shorter option nosep:
\begin{itemize}[nosep]
\item First item
\item Second item
\end{itemize}
Use nosep when you want to remove all these list gaps. If you only want to reduce the space above and below the list, specify topsep and partopsep instead.
Apply the setting to every itemize list
To make all itemize lists compact throughout the document, set their defaults in the preamble:
\usepackage{enumitem}
\setlist[itemize]{nosep}
For a table-specific adjustment, prefer options on the individual list. That avoids unexpectedly changing lists in the rest of your document.
Common mistakes
- Using an
l,c, orrcolumn for a list. These columns are for short, single-line contents. Usep{...}for a list or other paragraph content. - Changing
\arraystretchto fix list spacing.\arraystretchchanges the height of table rows by scaling the table’s strut; it does not set the list’stopseporitemsep. - Setting only
itemsep=0pt. That removes the gaps between list items, not the space above and below the list. Settopsep=0ptandpartopsep=0ptfor the latter. - Adding negative
\vspaceas a first fix. Negative space can make the table fragile or cause content to overlap. Adjust the list lengths first.
If the list spacing is already zero but the row still looks tall, the remaining height may come from the table’s row strut or other cell content. Treat that as a table-row spacing issue rather than adding more list options.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.