A list inside a table

If you use itemize inside a p column in tabular a lot of unnecessary space is added. Use a properly defined column type to do the right thing. The following was posted on CTT a long time ago by Donald Arseneau for itemized and enumerated cells.

Edit: Change \multicolumn contents to a p column.

\documentclass{article}
\usepackage{array}
\makeatletter
\newcolumntype{e}[1]{%--- Enumerated cells ---
   >{\minipage[t]{\linewidth}%
     \NoHyper%                Hyperref adds a vertical space
     \let\\\tabularnewline
     \enumerate
        \addtolength{\rightskip}{0pt plus 50pt}% for raggedright
        \setlength{\itemsep}{-\parsep}}%
   p{#1}%
   <{\@finalstrut\@arstrutbox\endenumerate
     \endNoHyper
     \endminipage}}

\newcolumntype{i}[1]{%--- Itemized cells ---
   >{\minipage[t]{\linewidth}%
        \let\\\tabularnewline
        \itemize
           \addtolength{\rightskip}{0pt plus 50pt}%
           \setlength{\itemsep}{-\parsep}}%
   p{#1}%
   <{\@finalstrut\@arstrutbox\enditemize\endminipage}}

\AtBeginDocument{%
    \@ifpackageloaded{hyperref}{}%
        {\let\NoHyper\relax\let\endNoHyper\relax}}
\makeatother

\newlength{\pcolwdth}
\begin{document}
\setlength{\pcolwdth}{5cm}% 
\begin{tabular}{li{\pcolwdth}}
2009--present & \multicolumn{1}{p{\pcolwdth}}{company 1} \\
              & \item editor                             \\
2011--2012    & \multicolumn{1}{p{\pcolwdth}}{company 2} \\
              & \item judge
                \item jury
                \item executioner                        \\
\end{tabular}
\end{document}

enter image description here


Depending on your preference, you might just as well avoid lists and set the items using a "fake list" environment:

enter image description here

\documentclass{article}
\newcommand{\nextitem}{\par\hspace*{\labelsep}\textbullet\hspace*{\labelsep}}
\begin{document}
\thispagestyle{empty}
\begin{tabular}{rp{3in}}
  2009--present & company 1
    \nextitem editor \\
  2011--2012 & company 2
    \nextitem jury
    \nextitem executioner
\end{tabular}
\end{document}

This only works because the second column is set in paragraph mode. You could also use an X-column (from the tabularx package).

An alternative suggestion altogether would be to use the moderncv class. Here's an extract from the moderncv template/example (there are other examples):

enter image description here


The list environment does not work inside l columns, but it is fine inside p columns:

\documentclass{article}
\usepackage{array}
\begin{document}
\thispagestyle{empty}
\begin{tabular}{l<{\raggedright}p{3in}}
  2009--present & company 1
  \begin{itemize}
  \item editor
  \end{itemize}
  \\
  2011--2012 & company 2
  \begin{itemize}
  \item jury
  \item executioner
  \end{itemize}
\end{tabular}
\end{document}

enter image description here