# Itemize environment within a tabular environment

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?

-
Welcome to TeX.SX! You can't use itemize in an l column, you need a p column. –  egreg Jan 17 '14 at 13:56
Thanks! I tried that, and I get Package array Error: Missing arg: token ignored as well as Missing # inserted in alignment preamble. Does it make a difference that I'm using tabularx? –  at least three characters Jan 17 '14 at 14:00
You need p{3cm} or some other length. –  egreg Jan 17 '14 at 14:03
@user2615799 You seem to be using some unnecessary curly braces which are not necessary. While extra braces do not harm anybody, at least none that I know off, still we should not get into the habit of using what are not necessary. Please see the answer where I have removed the redundant ones. –  Masroor Jan 17 '14 at 14:09

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}


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}


-
Thanks for the minipage idea - that's just the layout I was looking for! –  at least three characters Jan 17 '14 at 15:03

It's not your editor that gives you error messages, but latex itself. If it is the whole column that is supposed to be an itemize environment, you can simulate it. Using multirow will let you itemize only some (consecutive) lines:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{array, multirow}
\renewcommand{\arraystretch}{1.25}

\begin{document}

\begin{tabular}{r|>{\textbullet\hspace{\labelsep}}l}
Column 1 content &   Column 2 content \\
Another column 1 content & Another column 2 content
\end{tabular}\bigskip

\begin{tabular}{r|l}
Column 1 content &   Column 2 content \\
Another column 1 content & \multirow{2}{*}{\begin{tabular}{@{}>{\textbullet\hspace{\labelsep}}l}
An itemized list begins here\\ A second item \end{tabular}} \\%
Still another column 1 content \\
Final column 1 content  & Final column 2 content
\end{tabular}

\end{document}


-