[Tex/LaTex] A list inside a table

itemizelistsresumetables

I'm using this simple code to align date ranges on a CV:

\section{I'm pretty cool}\begin{tabular}{l l}
2009--present & company 1 \\
2011--2012 & company 2
\end{tabular}

Now this looks like this:

2009 - present   company 1
2011 - 2012      company 2

but I'd like to add a list in each of the entries, like this:

2009 - present   company 1:
                   * editor
2011 - 2012      company 2
                   * judge
                   * jury 
                   * executioner

How can I achieve this? I could itemize them in a separate column, but it doesn't work inside tabular in cases like this, where I want part of "company 2" to be in that column.

Best Answer

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

Related Question