# List independent of surrounding list

I want that a list that is inside a list ignores that it is the second level of depth:

\documentclass[11pt]{amsart}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item A
\begin{enumerate}
\item C
\item D
\end{enumerate}
\item B
\end{enumerate}
\end{document}


should give me something like:

1.A

1.C

2.D

2.B

I don't want to change the definition of enumii...

Is there an easy way to tell the second (inside) list that it should be a list of level 1?

• Can you be more specific? What should happen if there are more items in the nested list? Should there be no indent and the item number be the same? Dec 12 '14 at 16:05
• I added a second item to this list. It should just count from 1 to n.
– mimi
Dec 12 '14 at 16:07
• No indentation? Sorry, but I don't understand. Even less after reading your comment to cmhughes' answer. Dec 12 '14 at 16:11

This is very easy with the enumitem package.

You have to set [label=\arabic*.] as options for the outer enumerate and [label=\arabic*.,leftmargin=0pt] for the inner one.

MWE:

\documentclass[11pt]{amsart}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\arabic*.]
\item A
\begin{enumerate}[label=\arabic*.,leftmargin=0pt]
\item C
\item D
\end{enumerate}
\item B
\end{enumerate}
\end{document}


Output:

It sounds like you need

\setlist[enumerate,2]{label=(\arabic*)}


Here's a complete example:

% arara: pdflatex
\documentclass[11pt]{amsart}
\usepackage{enumitem}
\setlist[enumerate,2]{label=(\arabic*)}
\begin{document}
\begin{enumerate}
\item A
\begin{enumerate}
\item C
\end{enumerate}
\item B
\end{enumerate}
\end{document}

• Thats of cause possible, but is it also possible to tell the second list that it is "first level"? With your example one would have a problem when there is a second 2 level list where the second list should be like 1.1, 1.2. and so on...
– mimi
Dec 12 '14 at 16:08
• @mimi just to clarify: you'd like one instance of a second level enumerate to behave in one way, and another instance to behave in another? Dec 12 '14 at 16:11

\documentclass[11pt]{amsart}
\usepackage{enumitem}
\newlist{Enumerate}{enumerate}{4}
\setlist[Enumerate]{label=\arabic*}
\begin{document}
\begin{enumerate}
\item A
\begin{Enumerate}
\item C
\item D
\end{Enumerate}
\item B
\end{enumerate}
\end{document}


If you do not want to mess with the second level list, then make a different env.

\documentclass[11pt]{amsart}
\usepackage{enumitem}
\makeatletter
\def\nest{%
\edef\reset{\c@enumi\the\c@enumi\relax}\c@enumi\z@
}
\makeatother

\begin{document}

\begin{enumerate}
\item A
\nest
%    \begin{enumerate}
\item C
\item D
\reset
%    \end{enumerate}
\item B
\end{enumerate}
\end{document}

• hmmm. if this were to be cross-referenced without benefit of hyperlinking, i would be very confused. Dec 12 '14 at 16:47
• @barbarabeeton I am confused as well, but presumably the OP asked for it for a reason. Dec 12 '14 at 16:49