If I define numberenum like following,


    \item depth 1
        \item depth 2
            \item depth 3

result of code 1

Then I can get the above result. However, after depth 4, this code doesn't work. It's easy to redefine \labelenumiv, but the point is generating the label keeping this pattern until the depth limit of enumerate list.

custom labels for enumerate beyond level 4

This article solved a similar problem using label* method. But my case is more tricky because of brackets. Is there any way to define numberenum properly?


1 Answer 1


EDIT: Ahem. I just realised that there is a way simpler method to accomplish the same thing...

The enumitem package has a format key, which is normally used to set the font of the items labels (the font key is an alias for it). The formatted label will look like <format>{<label>}, where <format> is the value of the format key and <label> is the value of the label key.

You can define a macro that wraps its argument in parentheses and use that for the format key, like this: (I made the labels bold to show that this is still possible, but you can't swap \bfseries and \parenthesize.)



\renewlist{enumerate}{enumerate}{10} %% <- set the max depth to 10
\setlist[enumerate,1]{label=\arabic*} %% <- set the base level label separately


  \item this is level 1
    \item this is still level 1
      \item this is level 2
      \item this is still level 2
          \item this is level 3
          \item this is still level 3
              \item this is level 4
              \item this is still level 4
                  \item this is level 5 \label{deepitem}
                  \item this is still level 5

This is a reference to second-to-last item: \ref{deepitem}.


enter image description here

You must log in to answer this question.

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