Search code examples
latex

Bullet list inside a table cell


I want to create a table like what is shown in the figure, i.e. to have a bullet list of items in some of the table cells.

Items in cells

I tried to use simply the "itemize" environment within the "tabular" environment, like this:

\documentclass[12pt]{extarticle}

\begin{document}

\begin{table}
    \centering
    \begin{tabular}{| l | l | l | l |}
        \hline
        Verticals & Drivers & Enablers & 5G requirement \\
        \hline
        Education & 
        \begin{itemize} 
            \item Remote delivery 
            \item Immersive experiences 
        \end{itemize} & 
        \begin{itemize} 
            \item Video streaming 
            \item Augmented reality 
            \item Virtual reality 
        \end{itemize} & 
        \begin{itemize} 
            \item Large bandwidth 
            \item Low latency 
        \end{itemize} \\
        \hline
    \end{tabular}
\end{table}

\end{document}

But it doesn't work and pops up this error:

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

Does anyone know the cause of the error? By search, I realized that this technique is correct and using items inside a table is possible. But I cannot figure out the problem in my code.


Solution

  • You need a column of fixed width, e.g. m{4cm} instead of l

    \documentclass[12pt]{extarticle}
    
    \usepackage{geometry}
    \usepackage{array}
    
    \begin{document}
    
    \begin{table}
        \centering
         \setlength{\leftmargini}{0.4cm}
        \begin{tabular}{| m{2cm} | m{4cm} | m{4cm} | m{4cm} |}
            \hline
            Verticals & Drivers & Enablers & 5G requirement \\
            \hline
            Education & 
            \begin{itemize} 
                \item Remote delivery 
                \item Immersive experiences 
            \end{itemize} & 
            \begin{itemize} 
                \item Video streaming 
                \item Augmented reality 
                \item Virtual reality 
            \end{itemize} & 
            \begin{itemize} 
                \item Large bandwidth 
                \item Low latency 
            \end{itemize} \\
            \hline
        \end{tabular}
    \end{table}
    
    \end{document}
    
    

    Output:

    enter image description here