1

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:

enter image description here

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:

enter image description here

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?

4
  • And what is your question now? Or is it just a remark?
    – user31729
    Jun 12 '14 at 9:52
  • 1
    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.
    – ipavlic
    Jun 12 '14 at 9:56
  • I don't understand why you enumeration is inside a tabular environment?
    – Bernard
    Jun 12 '14 at 17:15
  • @Bernard The use case is that I have some classification and criteria for it.
    – ipavlic
    Jun 12 '14 at 19:51
3

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}

enter image description here

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}

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.