This is a follow-up question to Nested enumerate labels with parent label appended plus a single set of enclosing parentheses
First and foremost, sorry for my English, I'm learning it currently.
Exists any form to set first the numbers, and then enclose it between parenthesis, inside the local environment? I'm making my personal labelist environment, and I've the same problem. First my intended output and next my actual code:
(A) Item 1
(A.1) Other item
(A.2) Other item
(B) Item 2
(B.1) More items.
(B.1.1) Third level.
(B.1.2) Other third-level item.
(C) And so on
And here the code of my actual custom environment:
\newcounter{list@depth}
\setcounter{list@depth}{0}
\newenvironment{labelist}{%
\stepcounter{list@depth}
\ifnumcomp{\value{list@depth}}{=}{0}{
\begin{enumerate}[label=\Alpha*]
}{
\begin{enumerate}[label*=.\arabic*]
}
%% Here enclose the actual format between parenthesis
}{%
\ifnumcomp{\value{list@depth}}{=}{1}{
\setcounter{list@depth}{0}
}{
\addtocounter{list@depth}{-1}
}
\end{enumerate}
}
With this code, only I get outputs like this:
A Item 1
A.1 Other item
A.2 Other item
B Item 2
B.1 More items.
B.1.1 Third level.
B.1.2 Other third-level item.
C And so on
Because I need only to add parenthesis enclosing labels (an "a posteriori" format).

label=(\Alpha*)– Seamus Nov 01 '12 at 15:56