[Tex/LaTex] is there a way to “suspend” the counter of the enumitem package

#enumerateenumitem

I'm trying to set up a particular enumerated list, where I need to keep the counter in between \begin{enumerate} environments. Something like the following:

\begin{enumerate}[leftmargin=0.85cm, label=A\arabic*.]
\item First item
\item Second item
\end{enumerate}

write some other text here

% write another enumerated list here of the same type, but continuing with the numbering of the previous one.
\begin{enumerate}[leftmargin=0.85cm, label=A\arabic*.]
\item First item
\item Second item
\end{enumerate}

So clearly this doesn't work because the second enumerated list starts from the beginning. I tried using the suspend and resume commands within the mdwlist package but this didn't work.

Best Answer

There is no need to deal with the underlying counters directly if you are using enumitem. You can just use resume, resume* and/or series, with or without customised lists, depending on just how elaborate your needs are.

\documentclass{article}
\usepackage{enumitem}   

\begin{document}

  \begin{enumerate}[leftmargin=0.85cm, label=A\arabic*.]
    \item First item
    \item Second item
  \end{enumerate}
  If you don't mind having to re-specify everything:
  \begin{enumerate}[leftmargin=0.85cm, label=A\arabic*., resume]
    \item Third item
    \item Fourth item
  \end{enumerate}
  If you would prefer not to re-specify:
  \begin{enumerate}[resume*]
    \item Fifth item
    \item Sixth item
  \end{enumerate}
  What if you want to use first one enumeration:
  \begin{enumerate}[leftmargin=0.85cm, label=D\arabic*., series=denum]
    \item First item
    \item Second item
  \end{enumerate}
  And then another:
  \begin{enumerate}[leftmargin=0.85cm, label=(\alph*)., series=alphenum]
    \item First item
    \item Second item
  \end{enumerate}
  And then you want to continue the first?
  \begin{enumerate}[resume*=denum]
    \item Third item
    \item Fourth item
  \end{enumerate}
  Perhaps you even want to continue the second:
  \begin{enumerate}[resume*=alphenum]
    \item Third item
    \item Fourth item
  \end{enumerate}
  Too much work?
  \newlist{blist}{enumerate}{1}
  \setlist[blist]{leftmargin=0.85cm, label=B\arabic*.}
  \begin{blist}
    \item First item
    \item Second item
  \end{blist}
  And then you can have something entirely different:
  \begin{enumerate}[leftmargin=.3\textwidth, label=\Roman*)]
    \item First Roman
    \item Second Roman
  \end{enumerate}
  Before continuing:
  \begin{blist}[resume]
    \item Third item
    \item Fourth item
  \end{blist}

\end{document}

many lists