I have a list/sublist structure in my LaTeX document. By default, the sublist is delimited with letters, so you end up with this:
1. Item (a) sub item (b) sub item
In my document, I’ve got more than 26 sub items, so I was running into a Counter overflow error, which I fixed by rewriting the sub item label, so that they now look like this
1. Item 1.1 sub item 1.2 sub item
I’ve put a label on one of the items so that I can reference the specific step later on. The problem is that when the reference is rendered, it’s rendered using a letter, not the number of the sub item.
Here’s a sample doc that shows the problem.
\documentclass[11pt]{report} \begin{document} \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}} \begin{enumerate} \item Item \begin{enumerate} \item \label{lbl} Label here \end{enumerate} \end{enumerate} Ref: \ref{lbl} \end{document}
This gets rendered like this:
1. Item 1.1 Label here Ref: 1a
So instead of saying ‘Ref: 1.1’, it’s using ‘Ref: 1.a’. Is there a way to make the \ref use the numbering of the source enumeration? If not, is there anyway to generate correct references to items in a sublist with more than 26 items?
I’m looking at my copy of The LaTeX Companion, p.129, and from what I’m seeing I would suggest something like the following:
I don’t have access to a working LaTeX environment to test this at the moment, though.