Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bullet list inside a table cell

Tags:

latex

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.

like image 459
AR_Hasani Avatar asked Jan 25 '23 17:01

AR_Hasani


1 Answers

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}
like image 161
samcarter_is_at_topanswers.xyz Avatar answered Jan 30 '23 08:01

samcarter_is_at_topanswers.xyz