I am typesetting an ordered list where the entries may appear out of order, but should be assumed in order otherwise. I don't want to have to jump through \setcounter
hoops to do this. That is, I want something like
\begin{enumerate}
\item First
\item Second
\item[8] Eighth!
\item Ninth!
\item[4] Fourth
\end{enumerate}
to give the following Good output, instead of the Bad output:
A minimum working example follows.
\documentclass{article}
\usepackage{enumitem} % preferably something compatible with this guy
\begin{document}
Good:
\begin{enumerate}
\item[1.] First
\item[2.] Second
\item[8.] Eighth!
\item[9.] Ninth!
\item[4.] Fourth
\end{enumerate}
Bad:
\begin{enumerate}
\item First
\item Second
\item[8] Eighth!
\item Ninth!
\item[4] Fourth
\end{enumerate}
\end{document}
It should be noted that I don't want to have to specify the period afterwards, in case my list using a different numbering, e.g. Roman. Compatibility with enumitem
is preferred, but not required.
What is the correct way of going about this?
Best Answer
You don't want to abuse the optional argument to
\item
; better defining a\nextitem
command: