Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to add an ordered list (enumerate) to a table (tabular) in LaTeX with the following:

 \begin{tabular}{|l|l|}
  \hline
  Event Flow & 
   \begin{enumerate}
   \item This is item 1
   \item This is item 2
   \end{enumerate}
  \\
  \hline
 \end{tabular}

But I am getting the following error:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

                                               l.34    \item T
           his is item 1 ?

Does anyone know what the problem might be?

If I put the enumerate environment outside of the tabular environment it works, so I guess I am currently missing something with my example of the table.

share|improve this question

You need to use p-columns in your table where you want the lists to be. In your example, since the list is in column 2, the following should work. Instead of:

\begin{tabular}{|l|l|}

use

\begin{tabular}{|l|p{5cm}|}

This basically creates a paragraph environment inside that table cell, I think. See this post for more information.

share|improve this answer
    
Haven't tried it, but this was my first guess too. – dmckee Jan 9 '10 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .