Tx · LaTeX & TikZ

Why Does a LaTeX Table Trigger “Perhaps a Missing \item”?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check surrounding environments

    Look before the table for an empty list or an environment that is built on LaTeX’s list mechanism.

  2. 2. Inspect every list item

    Make sure each itemize, enumerate, or description environment contains the expected \item commands.

  3. 3. Check table-cell content

    Use ampersands and row breaks for table structure; put a list inside a suitable paragraph-style cell.

  4. 4. Compile a minimal example

    Temporarily remove nearby content, then add it back until the error returns.

The message “Something’s wrong—perhaps a missing \item” is a LaTeX list error. If it appears while compiling a table, the table may simply be where LaTeX notices that an earlier list was left empty or incorrectly structured. The reported line is a useful clue, but it is not always the line that caused the problem.

A tabular environment does not require \item. Its structure is controlled by & between columns and \\ between rows. Start by checking lists immediately before the table, then check for list commands inside its cells.

What causes the message?

LaTeX uses list machinery for environments such as itemize, enumerate, and description. Some custom environments use the same machinery behind the scenes. If LaTeX reaches the end of a list without finding an item, it can raise this error.

For example, this document has an empty itemize environment before the table:

\documentclass{article}

\begin{document}

\begin{itemize}
\end{itemize}

\begin{tabular}{cc}
Left & Right \\
1 & 2
\end{tabular}

\end{document}

The fix is to add an item, or remove the list if it is not needed:

\begin{itemize}
  \item A list entry.
\end{itemize}

If the error seems to point at \begin{tabular} or a later line, LaTeX may only have reached the point where it could detect the problem. Read the log for the first error and inspect the source above that location as well.

A practical debugging sequence

  1. Check the code immediately before the table. Look for \begin{itemize}, \begin{enumerate}, \begin{description}, or a custom environment that might contain a list. Confirm each opening environment has a matching closing command and that the list contains its required entries.

  2. Search for every \item. An \item should belong to a list, not stand directly in a tabular cell or ordinary paragraph. Conversely, a list that has no \item may trigger this message.

  3. Inspect table cells. A list inside a table cell must itself be a complete list. For a paragraph-style p{...} column, for example:

    \begin{tabular}{p{5cm}}
    \begin{itemize}
      \item First point
      \item Second point
    \end{itemize}
    \end{tabular}

    If a list is placed in a standard l, c, or r cell, use a paragraph-capable cell or a minipage so the cell can contain paragraph content.

  4. Reduce the document. Temporarily comment out nearby environments and table content. Compile, then restore sections until the error returns. This helps distinguish a list problem from a separate table syntax problem.

Keep list and table syntax separate

A small, ordinary table needs no list environment or \item:

\documentclass{article}

\begin{document}

\begin{tabular}{lc}
Name & Score \\
Ava & 8 \\
Noah & 10
\end{tabular}

\end{document}

Here, l and c specify left- and center-aligned columns. The ampersand separates the two cells in each row, and \\ ends a row. If you want a bullet list next to a table, place the list outside the tabular or put a complete list inside a suitable cell; do not use \item as if it started a table row.

Common mistakes to check

  • An empty list: \begin{itemize} followed by \end{itemize} without an item.
  • A missing or misplaced \item: List entries need \item; an \item outside a list is also wrong, though it may produce a different error.
  • An unclosed environment: A missing \end{itemize} or a mismatched environment can make later table code appear to be the source.
  • A custom list environment: The source may not say itemize or enumerate; a class or package environment may still be list-based. Check its documentation or definition.
  • A separate alignment error: A missing & or \\ usually causes a different table error. Fixing the \item message will not necessarily fix every error in the log, so recompile and address errors in order.

If no list appears anywhere near the table, check custom commands and environments used in the surrounding source, then reduce the document to a minimal example. The important distinction is that tabular lays out aligned cells, while \item belongs to list environments.

References

  1. LaTeX2e for authors

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.