5

I'd like to get a list that looks like this:

1. Text addressing #1.

2,3. Text addressing #2 and #3 together.

4. Text addressing #4.

The motivation is that the list items are referring to a previous list. Any idea on how to do this easily with enumerate? (Or some other way to do it that looks consistent with the enumerate environment, i.e. if I had an enumerate list right above it, the two would seem to be formatted identically except the 2,3 part..)

  • I found this interesting, and I was searching for a solution for three numbers actually. Piggybacking on egreg's answer, I came up with \newcommand{\tripleitem}{% \begingroup \stepcounter{enumi}% \edef\tmp{\theenumi, }% \stepcounter{enumi} \edef\tmpt{\theenumi, } \stepcounter{enumi} \edef\tmp{\endgroup\noexpand\item[\tmp\tmpt\labelenumi]}% \tmp} for three numbers. Perhaps someone who knows more about the language would know how to generalize it for an arbitrary number of grouped items? – kmantel Sep 3 '15 at 7:14
3

If you don't need greater generality, this might work:

\documentclass{article}
\newcommand{\doubleitem}{%
  \begingroup
  \stepcounter{enumi}%
  \edef\tmp{\theenumi, }%
  \stepcounter{enumi}
  \edef\tmp{\endgroup\noexpand\item[\tmp\labelenumi]}%
  \tmp}

\begin{document}
\begin{enumerate}
\item A
\item B
\item C
\item D
\end{enumerate}
Another
\begin{enumerate}
\item about A
\doubleitem about B and C
\item D
\end{enumerate}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.