# Confusing “missing \item” error from itemize

Why does an itemize section inside of a minipage section raises Something's wrong--perhaps a missing \item despite that not being the case?

Minimal example:

\documentclass{article}
\begin{document}
\begin{minipage}[c]{0.35\textwidth}

\begin{itemize}[nosep]
\item my first item
\end{itemize}

\end{minipage}\hfill
\begin{minipage}[c]{0.65\textwidth}

\end{minipage}
\end{document}


Result:

This is LuaTeX, Version 1.10.0 (TeX Live 2019 Gentoo Linux)
restricted system commands enabled.
(./test.tex
LaTeX2e <2018-12-01>

luaotfload | main : initialization completed in 0.073 seconds
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo)) (./test.aux)

! 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.6 \item m
y first item
? X
545 words of node memory still in use:
3 hlist, 1 rule, 2 local_par, 2 dir, 1 glue, 3 kern, 8 glyph, 4 attribute, 6
1 glue_spec, 4 attribute_list, 3 temp, 4 if_stack, 1 shape, 1 write nodes
avail lists: 3:2,4:1,7:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on test.log.


This looks similar to these questions I found, but in my case I'm not using tabular.

• Welcome to TeX.SX! itemize doesn't take an optional argument. Remove the [nosep] to make your example compile. – siracusa Oct 30 '19 at 1:28
• Thanks for the welcome! I was following examples in (this documentation)[mirrors.rit.edu/CTAN/macros/latex/contrib/enumitem/… which do give an optional argument. But after reading your comment I noticed that there is a (known bug)[texnia.com/enumitem.html] around nosep not being reliable. Removing the nosep argument fixes my issue. – Jesusaur Oct 30 '19 at 2:46
• Your test document compiles just fine if you add the instruction \usepackage{enumitem} to the preamble. – Mico Oct 30 '19 at 4:05

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.

• Thanks for the great explanation – Jesusaur Oct 30 '19 at 19:58

Loading enumitem resolves the issue:

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{minipage}[c]{0.35\textwidth}

\begin{itemize}[nosep]
\item my first item
\end{itemize}

\end{minipage}\hfill
\begin{minipage}[c]{0.65\textwidth}

\end{minipage}
\end{document}