[Tex/LaTex] Enumerate/itemize without margins in table cell best practice

best practiceslistsspacingtables

I want to use an itemize or enumerate list inside a table cell. For this there should be no margin around the list. My question is, what is best practice to do this? I found different solutions for example using a special package and setting options or using a native package and create a small environment where to set left margin to 0.

Best Answer

I recommend the package enumitem with the option inline

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{tabular}{c|p{6cm}|}
Text&
\begin{enumerate*}[label=(\arabic*.),itemjoin={\newline}]
\item foo
\item bar
\end{enumerate*}
\end{tabular}
\end{document}

enter image description here