LaTeX: Adding an Enumerate environment to a Tabular environment

The following works:

\documentclass{article}
\begin{document}
\begin{tabular}{|l|l|}
  \hline
  Event Flow & 
  \begin{minipage}{5in}
    \vskip 4pt
    \begin{enumerate}
   \item This is item 1
   \item This is item 2
   \end{enumerate}
   \vskip 4pt
 \end{minipage}
 \\
  \hline
 \end{tabular}
\end{document}

I'm guessing the trouble is that the enumerate environment needs to be in vertical mode: you could experiment with a \vbox.


You could use the following solution:

\documentclass{article}
\begin{document}
\begin{tabular}{|l|p{5cm}|}
  \hline
  Event Flow & 
    \begin{enumerate}
      \item This is item 1
      \item This is item 2
    \end{enumerate} \\
  \hline
 \end{tabular}
\end{document}

In other words, you can avoid the need for a minipage by simply creating a paragraph type column (which has a specified width). This compiles to

table with enumerate

Tags:

Latex