LaTeX error · Environments, lists and tables

LaTeX Error: Lonely \item--perhaps a missing list environment.

Quick answer

\item only works inside a list environment. LaTeX found one with no open itemize, enumerate or description around it, usually because the \begin{itemize} line is missing, misspelled or commented out, or the list was closed too early. Wrap the items in a list environment.

The error in the log

This is how the message appears in the .log file (and in the compile output). The line starting with l. is the line number where TeX noticed the problem; the real mistake is there or just before it.

! LaTeX Error: Lonely \item--perhaps a missing list environment.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.4 \item M
           ilk

Why it happens

  • The \begin{itemize} or \begin{enumerate} line is missing, or was commented out with %.
  • The list was closed with \end{itemize} before the last \item.
  • Items copied from one document into another without the surrounding list environment.

How to fix it

Put \begin{itemize} before the first \item and \end{itemize} after the last. Use enumerate for a numbered list and description for labelled items.

Broken: reproduces the error

\documentclass{article}
\begin{document}
Shopping list:
\item Milk
\item Bread
\end{document}

Try this in Octree — free LaTeX editor with AI, compiles in your browser

Fixed: compiles cleanly

\documentclass{article}
\begin{document}
Shopping list:
\begin{itemize}
  \item Milk
  \item Bread
\end{itemize}
\end{document}

Related errors

Frequently Asked Questions

How do I make a list without bullets so \item still works?

Keep the list environment and remove the label: \begin{itemize} with \item[], or with the enumitem package \begin{itemize}[label={}]. An \item on its own outside a list is never allowed.

Can \item be used in a table?

Only inside a list that is itself inside a p{...} column, for example \begin{itemize} \item ... \end{itemize} in the cell. In an l, c or r column a list cannot be used at all.

Why does Beamer report "Lonely \item"?

For the same reason as any other class: the \item lines on the frame are not inside itemize or enumerate. Check that the list's \begin is inside the same frame as its items.

Paste your document into Octree — compile errors get a Fix with AI button

When a compile fails, Octree shows the error next to the line that caused it and offers a one-click fix that you can review before applying. Free, nothing to install.

Fix it in Octree →