David, we can do one better. Try this insteadkreil wrote:Many thanks, I don't know what I got wrong when I first tried. The below does exactly what I want (even semi-automatically picks up the section level).
Code: Select all
\usepackage{enumitem}
\newlist{legal}{enumerate}{10}
\makeatletter
\setlist[legal]{label*=\arabic*.,ref=\csname the\enit@prevlabel\endcsname\arabic*.}
\newcommand{\thelegal}{\thesubsection-}
\makeatother
Then you won't ever have to remember what level you're at. Just use the legal environment all the way through.
Code: Select all
\begin{legal}
\item An item
\item Another item
\item\label{item:first} First labeled item
\begin{legal}
\item \label{item:second} Second item
\begin{legal}
\item\label{item:last} Last item
\end{legal}
\end{legal}
\end{legal}