## LaTeX forum ⇒ Text Formatting ⇒ Nested enumeration with brackets Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
ge0rg
Posts: 9
Joined: Sat Jul 25, 2015 7:00 am

### Nested enumeration with brackets

Hello people of the internet,

I have the following question:

I would like to do the following (excerpt from my seminar paper):

(1) The Turing Test is decisive:
(1.1) If S passes the Turing Test, it has a mind.
(1.2) If S does not pass the Turing Test, it does not have a mind.

(2) The Turing Test is too strong:
(2.1) If S passes the Turing Test, it has a mind.
(2.2) If S does not pass the Turing Test, it may or may not have a mind.

(3) The Turing Test is too weak:
(3.1) If S passes the Turing Test, it may or may not have a mind.
(3.2) If S does not pass the Turing Test, it does not have a mind.

(4) The Turing Test does not correlate to having minds at all:
(4.1) If S passes the Turing Test, it may or may not have a mind.
(4.2) If S does not pass the Turing Test, it may or may not have a mind.

The subpoints should be tabbed but I can't seem to make that work here. Anyhow, I have managed to do this:

\begin{enumerate}[label*=\arabic*.]     \item      The Turing Test is decisive:     	\begin{enumerate}[label*=\arabic*]      		\item If S passes the Turing Test, it has a mind.      		\item If S does not pass the Turing Test, it does not have a mind.      	\end{enumerate}     \item      The Turing Test is too strong:     	\begin{enumerate}[label*=\arabic*]      		\item If S passes the Turing Test, it has a mind.      		\item If S does not pass the Turing Test, it may or may not have a mind.      	\end{enumerate}      \item      The Turing Test is too weak:     	\begin{enumerate}[label*=\arabic*]      		\item If S passes the Turing Test, it may or may not have a mind.      		\item If S does not pass the Turing Test, it does not have a mind.      	\end{enumerate}      	\item      The Turing Test does not correlate to having minds at all:     	\begin{enumerate}[label*=\arabic*]      		\item If S passes the Turing Test, it may or may not have a mind.      		\item If S does not pass the Turing Test, it may or may not have a mind.      	\end{enumerate}\end{enumerate}

Which yields a similar reslut, but insead of (1) and (1.1) and so on, I get 1 and 1.1.
How can I make this work with the parenthesis being where I want them to be? If I do something like \begin{enumerate}[label*=(\arabic*)], I will get something like 1.(1) or (1).(1) .

Tags:

ge0rg
Posts: 9
Joined: Sat Jul 25, 2015 7:00 am
Problem solved. In case it interest someone:

\begin{enumerate}[label=(\arabic*)]     \item      The Turing Test is decisive:     	\begin{enumerate}[label=(\arabic{enumi}.\arabic*)]      		\item If S passes the Turing Test, it has a mind.      		\item If S does not pass the Turing Test, it does not have a mind.      	\end{enumerate}     \item      The Turing Test is too strong:     	\begin{enumerate}[label=(\arabic{enumi}.\arabic*)]      		\item If S passes the Turing Test, it has a mind.      		\item If S does not pass the Turing Test, it may or may not have a mind.      	\end{enumerate}      \item      The Turing Test is too weak:     	\begin{enumerate}[label=(\arabic{enumi}.\arabic*)]      		\item If S passes the Turing Test, it may or may not have a mind.      		\item If S does not pass the Turing Test, it does not have a mind.      	\end{enumerate}      	\item      The Turing Test does not correlate with having minds at all:     	\begin{enumerate}[label=(\arabic{enumi}.\arabic*)]      		\item If S passes the Turing Test, it may or may not have a mind.      		\item If S does not pass the Turing Test, it may or may not have a mind.      	\end{enumerate}\end{enumerate}

Stefan Kottwitz
Posts: 9102
Joined: Mon Mar 10, 2008 9:44 pm
Thank you for telling us the solution! It could help other people who come here via google, with a similar problem, so it's useful to read it here.

Hopefully I can answer another question. Feel free to open a new topic about any LaTeX problem you see.

Stefan

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Just to add one information for users who find this thread: package enumitem is necessary for above examples to compile.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
BTW: instead of setting the label properties each time again you can also setup {enumerate} with enumitem's \setlist command:

\setlist[enumerate,1]{label=(\arabic*),ref=\arabic*}\setlist[enumerate,2]{label=(\theenumi.\arabic*),ref=\theenumi.\arabic*}

or maybe even

\newcommand*\enparen[1]{(#1)}\setlist[enumerate]{format=\enparen}\setlist[enumerate,1]{label=\arabic*}\setlist[enumerate,2]{label*=.\arabic*}

This would also set the parentheses when the items are referenced, while in the first examples references would have no parantheses.

A complete example:

\documentclass{article}\usepackage{enumitem} \setlist[enumerate,1]{label=(\arabic*),ref=\arabic*}\setlist[enumerate,2]{label=(\theenumi.\arabic*),ref=\theenumi.\arabic*} \begin{document} \begin{enumerate}   \item The Turing Test is decisive:     \begin{enumerate}       \item If S passes the Turing Test, it has a mind.       \item If S does not pass the Turing Test, it does not have a mind.     \end{enumerate}   \item The Turing Test is too strong:     \begin{enumerate}       \item If S passes the Turing Test, it has a mind.       \item If S does not pass the Turing Test, it may or may not have a mind.     \end{enumerate}   \item The Turing Test is too weak:     \begin{enumerate}       \item If S passes the Turing Test, it may or may not have a mind.       \item If S does not pass the Turing Test, it does not have a mind.     \end{enumerate}   \item The Turing Test does not correlate with having minds at all:     \begin{enumerate}       \item If S passes the Turing Test, it may or may not have a mind.       \item If S does not pass the Turing Test, it may or may not have a mind.     \end{enumerate}\end{enumerate}  \end{document}

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim