Text FormattingGrouped List Items

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
SAKDOSS
Posts: 14
Joined: Thu Feb 21, 2013 5:06 pm

Grouped List Items

Post by SAKDOSS »

Hello everybody,

I have the following code.

Code: Select all

\begin{enumerate}[(i)]
\item 1st case
\item 2nd case
\item 3rd case
\end{numerate}

Now I want to regroup the two first cases in one item, i.e. the first line would be for example "(i),(ii) cases 1 and 2" or something similar.

Is it possible? I found a lot documentation on how to customize the items but not on this particular question.

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Grouped List Items

Post by Stefan Kottwitz »

You can nest enumerate environments, i.e. start an inner enumerate environment after \item.

Stefan
LaTeX.org admin
SAKDOSS
Posts: 14
Joined: Thu Feb 21, 2013 5:06 pm

Re: Grouped List Items

Post by SAKDOSS »

I could do that but the two cases would still be in different items wouldn't they ?

In fact I have a theorem which regroup three cases, namely: (i), (ii), (iii) that I present normally. But for the demonstration of this theorem i would like to prove first (i) and (ii) together and then in a second time prove (iii).

That's why I am interesting in presenting (i) and (ii) in only one item without spliting them with subitems.
alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

Grouped List Items

Post by alainremillard »

You could use the optional argument of \item to override the label and then set to counter to the right amount, like this :

Code: Select all

\documentclass{article}
\usepackage[shortlabels]{enumitem}

\begin{document}
\begin{enumerate}[(i)]
\item[(i) and (ii)] 1st case and 2nd case
\setcounter{enumi}{2}
\item 3rd case
\end{enumerate}
\end{document}
Good day
Alain Rémillard
SAKDOSS
Posts: 14
Joined: Thu Feb 21, 2013 5:06 pm

Re: Grouped List Items

Post by SAKDOSS »

Works fine, thanks !
Post Reply