# List spacing inside a table

Please take a look on the following example:

\documentclass[a4paper]{article}

\begin{document}
\begin{tabular}{ |p{ \textwidth}| }

\hline
\begin{enumerate}
\item Item in a list
\end{enumerate} \\

\hline
Item not in a list \\
\hline
\end{tabular}
\end{document}


The "Item in a list" has an extra spacing at top and bottom inside a table cell in comparison to "Item not in a list".

How to reduce this top and bottom spacing?

-
Related Question: Enumerate environment with tabular layout –  Peter Grill Apr 3 '12 at 15:34

## Using enumitem:

Taking a hint form Stephan Lehmke, with the enumitem package you could use the inline enumerate* environment (assuming you have a single item):

The enumitem package also includes a resume option which would be useful if you wanted to resume the list in a different row.

### Code:

\documentclass{article}
\usepackage[inline]{enumitem}

\begin{document}
\begin{tabular}{ |p{ \textwidth}| }

\hline
\begin{enumerate*}
\item Item in a list
\end{enumerate*} \\

\hline
Item not in a list \\
\hline
\end{tabular}
\end{document}


## Using a Counter:

Alternatively, you could just use your own counter which yields results identical to above:

\documentclass{article}

\newcounter{MyCounter}%
\newcommand*{\MyItem}{\refstepcounter{MyCounter}\theMyCounter.~}%

\begin{document}
\begin{tabular}{ |p{ \textwidth}| }

\hline
\MyItem Item in a list\\
\hline
Item not in a list \\
\hline
\end{tabular}
\end{document}

-

I tried

\usepackage{paralist}


and then

\begin{inparaenum}
\item Item in a list\par
\item Item in a list
\end{inparaenum}\\


The explicit \par looks really weird, but with all other enumerate constructs provided by paralist, the extra spacing was still there.

-