When using nested enumerate
environments, I am using the following syntax :
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label*=\arabic*.]
\item A question
\stepcounter{enumi}
\begin{enumerate}[label*=\alph*.]
\item A subquestion.
\item Another subquestion.
\end{enumerate}
\end{enumerate}
\end{document}
which works just fine and displays exactly what I expect:
However, with this other example,
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label*=\arabic*.]
\stepcounter{enumi}
\begin{enumerate}[label*=\alph*.]
\item A subquestion.
\item Another subquestion.
\end{enumerate}
\end{enumerate}
\end{document}
I have a missing \item
error, despite of an output corresponding to my expectations.
What would be a correct way of proceeding in order to avoid such errors ?
And a related question (which would maybe deserve another topic): with TeXstudio, the second example does not display the PDF preview because of the compilation error, while with TeXmaker it does. Is there any way to display the PDF in case of (minor) compilation errors in TeXstudio ?
Best Answer
With a simple dummy item of no label
\item[] {}
, one can write this: