# Remove whitespace around an enumeration in a table

I've tried using the enumitem suggestion given on https://stackoverflow.com/questions/4968557/latex-very-compact-itemize, but I still see white space around my enumeration:

\documentclass{article}
\usepackage{enumitem,lipsum}

\begin{document}

\begin{table}
\begin{tabular}{lp{.7\textwidth}}
1 & \begin{enumerate}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
\item \lipsum[2]{}
\item \lipsum[3]{}
\end{enumerate}\\
2 & \lipsum[5]{}\\
\end{tabular}
\end{table}

\end{document}


The result:

I found a compress trick in one of the answers:

\documentclass{article}
\usepackage{enumitem,lipsum,array}

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

\begin{document}

\begin{table}
\begin{tabular}{l>{\compress}p{.7\textwidth}}
1 & \begin{enumerate}[noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
\item \lipsum[2]{}
\item \lipsum[3]{}
\end{enumerate}\\
2 & \lipsum[5]{}\\
\end{tabular}
\end{table}

\end{document}


This gets rid of the white space above the list, but the one on the bottom still remains:

The end result is that the table looks unbalanced — when some of the rows are not an enumeration, there is no spacing between them. When a row is an enumeration, there is spacing.

How can I get rid of the extra white space below an enumeration?

• And what is your question now? Or is it just a remark?
– user31729
Jun 12 '14 at 9:52
• My question is how to get rid of the extra white space at the bottom of an enumeration. I'll copy it from the title to the text, sorry. Jun 12 '14 at 9:56
• I don't understand why you enumeration is inside a tabular environment? Jun 12 '14 at 17:15
• @Bernard The use case is that I have some classification and criteria for it. Jun 12 '14 at 19:51

This will do what you want.

\documentclass{article}
\usepackage{enumitem,lipsum,array}

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

\newlist{myenumerate}{enumerate}{1}
\setlist[myenumerate]{nosep,label=\arabic*.,after*=\vspace{-\baselineskip}} %% adjust \vspace as needed.

\begin{document}

\begin{table}
\begin{tabular}{l>{\compress}p{.7\textwidth}}
1 & \begin{myenumerate}
\item \lipsum[2]
\item \lipsum[3]
\end{myenumerate}\\
2 & \lipsum[5]{}\\
\end{tabular}
\end{table}

\end{document}


But......

Are you sure you want to do this this way. Here there can't be page breaks.

As an alternative, you can use a list.

\documentclass{article}
\usepackage{enumitem,lipsum,array}

\newlist{myenumerate}{enumerate}{1}
\setlist[myenumerate]{label=\arabic*.,after*=\vspace{-0.25\baselineskip}}

\begin{document}

\begin{enumerate}[label=\arabic*]
\item
\begin{myenumerate}
\item \lipsum[2]
\item \lipsum[3]
\end{myenumerate}
\item \lipsum[5]{}
\end{enumerate}
\end{document}


• The data is tabular, so unfortunately I can't use a list. Thank you for the solution! Jun 13 '14 at 8:22
• @ipavlic Glad it helped. :)
– user11232
Jun 13 '14 at 8:51