8

By trying to compile the code below the following error will be raised for each \item entry.

Something's wrong--perhaps a missing \item

\begin{tabular}{ll}
    560 v. Chr. & \begin{itemize}
                     \item erster Eintrag
                     \item zweiter Eintrag
                     \item dritter Eintrag 
                  \end{itemize} \\
\end{tabular}
Troy
  • 13,741

2 Answers2

10

itemize inside tabular is allowed, but properly used. In the following there are two examples of usage, with different outputs.

\documentclass{article}

\begin{document}

%\begin{tabular}{ll}
\begin{tabular}{lp{8cm}}
    560 v. Chr. & \begin{itemize}
                     \item erster Eintrag
                     \item zweiter Eintrag
                     \item dritter Eintrag 
                  \end{itemize} \\
\end{tabular}

\begin{tabular}{lp{8cm}}
  560 v. Chr. & \parbox{7.9cm}{\begin{itemize}
                     \item erster Eintrag
                     \item zweiter Eintrag
                     \item dritter Eintrag 
                  \end{itemize} }\\
\end{tabular}

\end{document}

enter image description here

David Carlisle
  • 757,742
  • is there a way to use tabularx's X option, i.e. not specifying the width of the column with p{}, but adjusting it dynamically as 1/3 of \linewidth? My header would be \begin{tabularx}{\linewidth}{X | X | X } – Marie. P. Jul 12 '21 at 18:03
3

An itemize inside a tabular cell is not allowed.

Use:

\begin{tabular}{ll}
560 v. Chr. & erster Eintrag\\
            & zweiter Eintrag\\
            & dritter Eintrag\\ 
\end{tabular}

Otherwise, if you want LaTeX to automatically break the line, use:

\begin{tabular}{lp{5cm}}
560 v. Chr. & erster Eintrag zweiter Eintrag dritter Eintrag\\ 
\end{tabular}
Troy
  • 13,741
Claudio
  • 146