[Tex/LaTex] Itemize environment within a tabular environment

itemizetables

I've got the following code:

\begin{tabular}{r|l}
     {Column 1 content}&{\begin{itemize}
         \item Column 2 content
     \end{itemize}}
\end{tabular}

But for some reason, the editor I'm using to code – Latexian – keeps giving me errors at lines 3 and 4 of this code, stating

LaTeX error: Something's wrong – perhaps a missing \item

Line 59: \item C

In the PDF preview, the list displays without bullet points, but the table appears properly formatted.

What does this error mean, and how can it be fixed?

Best Answer

There are at least two ways of solving your problem.

  1. Using a p type column.
  2. Using a minipage environment.

Which you want to use will depend on the context. But perhaps the later one might be better when you consider vertical alignments.


Here are the solutions and corresponding outputs.


Using p column.

\begin{tabular}{r|p{0.4\textwidth}}
  Column 1 content & \begin{itemize}
  \item Column 2 content 1
  \item Column 2 content 2
  \end{itemize}
\end{tabular}

enter image description here


Using a minipage.

\begin{tabular}{r|l}
  Column 1 content &
  \begin{minipage}[t]{0.4\textwidth}
    \begin{itemize}
    \item Column 2 content 1
    \item Column 2 content 2
    \end{itemize}
  \end{minipage}
\end{tabular}

enter image description here