Confusing "missing \item" error from itemize
The error you encounter can also be generated by the following code:
\documentclass{article}
\begin{document}
\begin{itemize}[nosep]
\item my first item
\end{itemize}
\end{document}
As you've already discovered, the real source of the error is the failure to load the enumitem
package. The enumitem
package, and not the LaTeX kernel, defines the optional setting nosep
.
Nevertheless, it may be instructive to trace why LaTeX would issue the following messages when running the MWE shown above:
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \item m
y first item
?
If the enumitem
package is not loaded, LaTeX requires the very first item [pun intended] after \begin{itemize}
to be \item
. Thus, because the material in square brackets is not preceded by an \item
statement in the MWE, LaTeX gets confused and stops with an admittedly not particularly clear error message.
Incidentally, if one inserts an \item
directive immediately before [nosep]
, i.e., if one changes the MWE to
\documentclass{article}
\begin{document}
\begin{itemize}\item[nosep]
\item my first item
\end{itemize}
\end{document}
LaTeX runs just fine and the word "nosep" shows up as the substitute for the default level-1 marker (which happens to be a text bullet):
Finally, as already noted, it's essential to load the enumitem
package in order to get the expected behavior from the [nosep]
option.