I'm working on a text that has a long list of numbered items (some with sub-numbers). Under normal circumstances, there wouldn't be an issue, but someone (not me) wanted to have cross-references to another set of numbered items. If the items in "my" list are capital letters and the items in the other list are lower-case letters, the top level of the list looks like this:
A (a). B (b). C (f). D (h and u). E (z).
There is no double-labeling of the sub-item lists.
Is there a way to add an (optional) argument to \enumerate
that will add a number I give it in parentheses AND eliminate the parenthetical argument if I don't give it that argument? Something like this:
\item First item
\item {32} Second item
\begin{enumerate}
\item Sub-item one
\item Sub-item two
\item Sub-item three
\end{enumerate}
\item {4 and 68} Third item
\item Fourth item
\end{enumerate}
That would, in principle, produce:
- First item
2 (32). Second item
a) Sub-item one
b) Sub-item two
c) Sub-item three
3 (4 and 68). Third item
- Fourth item
(Note the location of the full stop after each label and the parentheses in the second-level list.)