Missing \item error, even though there is no list

I am trying to create a book class document in Malayalam using XeLaTeX and I get this error:

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

even when there is no list there.

I would like to know if there are other situations that can cause such an error, so that I can try to locate the problem.

• (1) welcome, (2) without any code, who knows what is wrong Jun 13 '18 at 14:07
• Yes the error can happen also outside lists. Jun 13 '18 at 14:23
• Some environments in latex that the user would not imagine are "lists" are actually based on the \trivlist environment which (as the name suggests) is a very minimalist list. Perhaps, you have done something with makes one of these \trivlists think an \item is missing. Jun 13 '18 at 15:00
• @alephzero you don't even need a trivlist.... Jun 13 '18 at 15:59

The \@noitemerr macro that generates this error is used in the list code for some cases of possibly empty lists but (for reasons lost in the mists of time) it is also used if a vertical space is added when you are in horizontal rather than vertical mode. This is by far the most common cause of the error.

\documentclass{article}

\begin{document}

\end{document}


produces

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

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