2

I want to create a nested list in which the outer list have the letters counter and the inner lists continue numbering from the last number of a list which ends outside of the outer list. Here is an example of this:

1. test 1 
2. test 2
3. test 3

a. head 1
  4. list 4
  5. list 5
b. head 2
  6. list 6
  7. list 7

I have tried the following MWE but does not do what I want.

enter image description here

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{enumerate}
\item list 1
\item list 2
\item list 3
\end{enumerate}

\begin{enumerate}[label=(\alph*)]
\item head 1
\begin{enumerate}[resume]
\item list 4
\item list 5
\item list 6
\end{enumerate}
\item head 2
\begin{enumerate}[resume]
\item list 7
\item list 8
\item list 9
\end{enumerate}
\end{enumerate}

\end{document}

2 Answers 2

5

It's possible to define a enumerate series which can be explicitly resumed.

The name of a series is basically arbitrary, but must be unique, say series=myouterlist and say resume=myouterlist where appropiate.

I would suggest to use a separate enumerate list clone in order to provide the same settings for all resumed lists belonging to this list instead of retyping the settings over and over again (which might be error-prone)

\documentclass{article}
\usepackage{enumitem}

\newlist{outerenum}{enumerate}{1}
\setlist[outerenum]{label={\arabic*.}}

\begin{document}



\begin{outerenum}[series=myouterlist]
\item list 1
\item list 2
\item list 3
\end{outerenum}

\begin{enumerate}[label=(\alph*)]
\item head 1
\begin{outerenum}[resume=myouterlist]
\item list 4
\item list 5
\item list 6
\end{outerenum}
\item head 2
\begin{outerenum}[resume=myouterlist]
\item list 7
\item list 8
\item list 9
\end{outerenum}
\end{enumerate}

\end{document}

enter image description here

2

Depending on your layout, you can provide an empty argument for the outer list and make the inner list look like an outer list:

enter image description here

\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate,1]{label=(\alph*)}
\setlist[enumerate,2]{label=\arabic*.}

\begin{document}

\begin{enumerate}
  \item[]
    \begin{enumerate}[leftmargin=0pt]
      \item list 1
      \item list 2
      \item list 3
    \end{enumerate}
  \item head 1
    \begin{enumerate}[resume]
      \item list 4
      \item list 5
      \item list 6
    \end{enumerate}
  \item head 2
    \begin{enumerate}[resume]
      \item list 7
      \item list 8
      \item list 9
    \end{enumerate}
\end{enumerate}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .