5

I am writing a detailed workflow protocol for my student assistants using the enumerate environment with custom labels of the form 1 , 1.1, 1.1.1 , and so on. This is so that, when discussing things and writing up results, we can refer to specific steps by their label rather than by their (rather cumbersome) description. The code I am using is:

% level 1
\renewcommand{\theenumi}{arabic{\enumi}}
\renewcommand{\labelenumi}{\theenumi}
% level 2
\renewcommand{\theenumii}{arabic{\enumii}}
\renewcommand{\labelenumii}{\theenumi.\theenumii}
% level 3
\renewcommand{\theenumiii}{arabic{\enumiii}}
\renewcommand{\labelenumiii}{\theenumi.\theenumii.\theenumiii}
% level 4
\renewcommand{\theenumiv}{arabic{\enumiv}}
\renewcommand{\labelenumiv}{\theenumi.\theenumii.\theenumiii\theenumiv}

But that seems to be the limit. In a couple of places I need to go into level 5, but if I add

% level 5
\renewcommand{\theenumv}{arabic{\enumv}}
\renewcommand{\labelenumv}{\theenumi.\theenumii.\theenumiii.\theenumiv.\theenumv}

I just get the next level 4 number in the sequence. Here is a MWE

\documentclass{article}

\begin{document}

% level 1
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\labelenumi}{\theenumi}
% level 2
\renewcommand{\theenumii}{\arabic{enumii}}
\renewcommand{\labelenumii}{\theenumi.\theenumii}
% level 3
\renewcommand{\theenumiii}{\arabic{enumiii}}
\renewcommand{\labelenumiii}{\theenumi.\theenumii.\theenumiii}
% level 4
\renewcommand{\theenumiv}{\arabic{enumiv}}
\renewcommand{\labelenumiv}{\theenumi.\theenumii.\theenumiii.\theenumiv}
% level 5
\renewcommand{\theenumv}{\arabic{enumv}}
\renewcommand{\labelenumv}{\theenumi.\theenumii.\theenumiii.\theenumiv.\theenumv}

\begin{enumerate}
  \item this is level 1
    \begin{enumerate}
      \item this is level 2
        \begin{enumerate}
          \item this is level 3
            \begin{enumerate}
              \item this is level 4
                \begin{enumerate}
                  \item this is level 5
                \end{enumerate}
            \end{enumerate}
        \end{enumerate}
    \end{enumerate}
\end{enumerate}

\end{document}

So, is there a way to define enumerate levels beyond depth 4?

  • 3
    You want to look at the enumitem package; there's an example about legal that seems exactly what you need. – egreg Dec 5 '14 at 10:49
  • Thanks. I had a quick look at the manual and it looks like it will work. – Koldito Dec 5 '14 at 10:52
6

A straightforward modification of an example in the manual of enumitem seems to do what you want:

\documentclass{article}

\usepackage{enumitem}

\newlist{step}{enumerate}{10}
\setlist[step]{label*=\arabic*.,leftmargin=2em}

\begin{document}

\begin{step}
  \item this is level 1
    \begin{step}
      \item this is level 2
        \begin{step}
          \item this is level 3
            \begin{step}
              \item this is level 4
                \begin{step}
                  \item this is level 5
                \end{step}
            \end{step}
        \end{step}
    \end{step}
\end{step}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.