When having a list defined for one's own environment like (I need levels deeper than the standard 4):
\setlistdepth{12}
\newlist{MyEnumerate}{enumerate}{12}
\setlist[MyEnumerate,1]{label=\arabic*.}
...
this all works good and one can also overrule the label.
However when trying to set the start counter this does not work in the new list.
i.e.
\begin{enumerate}[label=\alph*]
\setcounter{enumi}{3}
\item an item
...
works but the following doesn't:
\begin{MyEnumerate}[label=\alph*]
\setcounter{enumi}{3}
\item an item
So the question:
- how can I set the counter for
MyEnumerate
and also for the higher levels ?
The complete MWE:
documentclass[twoside]{book}
\RequirePackage{enumitem}
\setlistdepth{12}
\newlist{MyEnumerate}{enumerate}{12}
\setlist[MyEnumerate,1]{label=\arabic*.}
\setlist[MyEnumerate,2]{label=(\alph*)}
\setlist[MyEnumerate,3]{label=\roman*.}
\setlist[MyEnumerate,4]{label=\Alph*.}
\setlist[MyEnumerate,5]{label=\arabic*.}
\setlist[MyEnumerate,6]{label=(\alph*)}
\setlist[MyEnumerate,7]{label=\roman*.}
\setlist[MyEnumerate,8]{label=\Alph*.}
\setlist[MyEnumerate,9]{label=\arabic*.}
\setlist[MyEnumerate,10]{label=(\alph*)}
\setlist[MyEnumerate,11]{label=\roman*.}
\begin{document}
A standard list:
================
\begin{enumerate}[label=\alph*]
\setcounter{enumi}{3}
\item an item
\begin{enumerate}[label=\alph*]
\setcounter{enumii}{13}
\item an item
\begin{enumerate}[label=\alph*]
\setcounter{enumiii}{23}
\item an item
\begin{enumerate}[label=\alph*]
\setcounter{enumiii}{23}
\item an item
\item an item
\item an item
\end{enumerate}
\item an item
\item an item
\end{enumerate}
\item an item
\item an item
\end{enumerate}
\item an item
\item an item
\end{enumerate}
================
A modified list:
================
\begin{MyEnumerate}[label=\alph*]
\setcounter{enumi}{3}
\item an item
\begin{MyEnumerate}[label=\alph*]
\setcounter{enumii}{13}
\item an item
\begin{MyEnumerate}[label=\alph*]
\setcounter{enumiii}{23}
\item an item
\item an item
\item an item
\end{MyEnumerate}
\item an item
\item an item
\end{MyEnumerate}
\item an item
\item an item
\end{MyEnumerate}
================
\end{document}
And the resulting image:
Best Answer
The counters for new lists are named using the list name. From the documentation (p.17):
So in your case, the counters are
MyEnumeratei
,MyEnumerateii
, etc.But as Ulrike mentions in the comments, it's usually not necessary to reference the counters directly, so instead of
\setcounter{MyEnumeratei}{6)
you can simply use\begin{MyEnumerate}[start=6]
instead. I've redone two of your example lists using this syntax. This syntax means that you don't need to know which level you are at to set the counter correctly.