Enumerate a list with two parallel prefixes

Defining two counters Ax and Bx could be a solution, effectively using \item[\theAx] and \item[\theBx] after incrementing them each time they are used... defined in the preamble as \itemA and \itemB respectively.

\documentclass{article}

\newcounter{Ax}
\newcounter{Bx}

\newcommand{\itemA}{%
    \addtocounter{Ax}{1}
    \item[A\theAx.]}
\newcommand{\itemB}{%
    \addtocounter{Bx}{1}
    \item[B\theBx.]}

\begin{document}

\noindent
It is always possible to do run two enumerate-series in parallel 
by defining two \texttt{counters}--- \texttt{Ax} and \texttt{Bx}.
\begin{enumerate}
  \itemA Series A--- point \# 1
  \itemB Series B--- point \# 1
  \itemA Series A--- point \# 2
  \itemB Series B--- point \# 2
  \itemB Series B--- again
  \itemB Series B--- once more
  \itemA Series A--- next point\ldots\ probably \# 3
\end{enumerate}

\end{document}


You can, using the series and the resume* keys from enumitem, but it can be tedious to code if you have really long lists.

The idea is to define a first series, with the counter prefixed with the letter A, and another series, with B as prefix, to end each series after an item, then start the other series for a single item end end it the resume the first series, and so on. Here is a small code sto show how it goes:

\documentclass{article}

\usepackage{enumitem}

 \begin{document}

\begin{enumerate}[label=A\arabic*., topsep=0pt, series=A]
\item First item
\end{enumerate}
\begin{enumerate}[label=B\arabic*., topsep=0pt, series=B]
\item Second item
\end{enumerate}
\begin{enumerate}[resume*=A]
\item Third item
\end{enumerate}
\begin{enumerate}[resume*=B]
\item Fourth item
\end{enumerate}

\end{document} 

enter image description here

Tags:

Enumerate