Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When compiling this:

   \begin{table*}[h]
    \begin{tabular}{|lll|}
        \hline \bfseries Name & \bfseries Opt 1 & \bfseries Opt 2 \\\hline 
        \hline \bfseries Item 1 & X & \\\multicolumn{3}{|c|}{
            \begin{itemize}
                \item Key 
                \item Key 
                \item Key 
            \end{itemize} }        % <--- Something's wrong--perhaps a missing \item
         \\ \bfseries Item 2 & X & X \\\multicolumn{3}{|c|}{
            \begin{itemize}
                \item Key key key key key key key key key key key
                \item Key key key key key key key key key key key
                \item Key key key key key key
            \end{itemize} }        % <--- Something's wrong--perhaps a missing \item
         \\ \bfseries Item 3 &  & X\\\multicolumn{3}{|c|}{
            \begin{itemize}
                \item Key
             \end{itemize} }       % <--- Something's wrong--perhaps a missing \item 
          \\ \hline
     \end{tabular}
   \end{table*}

The compiler keeps complaining like 20 times or so saying Something's wrong--perhaps a missing \item in marked lines.

This should look like:

    +------------------------------+  
    | Name            opt 1  opt 2 |  
    +------------------------------+  
    | Item 1            x     x    |  
    |   * long text with stuff ... |  
    |   * bullte 2                 | 
    |   * and so on                |  
    +------------------------------+  
    | Item 2                  x    | 
    |   * other list               | 
    |   * other list               | 
    +------------------------------+
share|improve this question
3  
You can't put a multiline text in a column of type "c". Use the p-type instead. –  Ulrike Fischer Mar 16 '12 at 14:22
    
@UlrikeFischer this seems to answer the original question perfectly, are there disadvantages to using this method? –  oLas May 15 at 18:35
add comment

2 Answers

up vote 9 down vote accepted

I guess that \parbox command does the trick. The problem is, that inside a table, you cannot have something that needs "paragraph" line breaking, but inside \parbox, you can. You just have to specify the width in advance.

   \begin{table*}[h]
    \begin{tabular}{|lll|}
        \hline \bfseries Name & \bfseries Opt 1 & \bfseries Opt 2 \\\hline 
        \hline \bfseries Item 1 & X & \\\multicolumn{3}{|c|}{\parbox{0.9\textwidth}{
            \begin{itemize}
                \item Key 
                \item Key 
                \item Key 
            \end{itemize} }}
         \\ \bfseries Item 2 & X & X \\\multicolumn{3}{|c|}{\parbox{0.9\textwidth}{
            \begin{itemize}
                \item Key key key key key key key key key key key
                \item Key key key key key key key key key key key
                \item Key key key key key key
            \end{itemize} }}
         \\ \bfseries Item 3 &  & X\\\multicolumn{3}{|c|}{\parbox{0.9\textwidth}{
            \begin{itemize}
                \item Key
             \end{itemize} }}
          \\ \hline
     \end{tabular}
   \end{table*}
share|improve this answer
    
Thank you very much. That was the right hint! –  Ich Mar 16 '12 at 14:54
    
Could you add a picture of the output? –  doncherry Oct 24 '12 at 18:34
add comment

Here is a variant using cals tables. Borders can be adjusted further, but I like my version.

table with itemize

\documentclass{article}
\usepackage{cals}
\usepackage{xcolor}
\begin{document}
\begin{calstable}
\colwidths{{30mm}{20mm}{20mm}}
\makeatletter
\brow
\cell{Name}
\cell{opt 1}
\cell{opt 2}
\erow
\brow
\cell{Item 1}
\cell{x}
\cell{x}
\erow
\def\cals@rs@width{0pt}
\brow
\nullcell{ltb}
\nullcell{tb}
\nullcell{trb}\spancontent{
  \begin{itemize}
  \item Key key key key key key key key key key key
  \item Key key key key key key key key key key key
  \item Key key key key key key
  \end{itemize}
}
\erow
\def\cals@rs@width{0.4pt}
\brow
\cell{Item 2}
\cell{}
\cell{x}
\erow
\def\cals@rs@width{0pt}
\brow
\nullcell{ltb}
\nullcell{tb}
\nullcell{trb}\spancontent{
  \begin{itemize}
  \item Key key key key key key key key key key key
  \item Key key key key key key key key key key key
  \item Key key key key key key
  \end{itemize}
}
\erow
\end{calstable}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.