2

I want to refer to a description list item by name instead of number. To that effect, I've added labels to each item, but when referencing them I only get the name of the section, not of the list item. How can I change it to show a custom label for each item?

\section{Definitions}
\begin{description}
  \item[Rule1\label{itm:1}] The Suffix to Prefix Rule. 
  \item[Rule2] The Substring Matching Rule \label{2}
  \begin{description}
    \item[Rule2-1] Character Matching Rule \label{2-1}
  \end{description}
  \item[Rule3] The Uniqueness Property Rule \label{3}
\end{description}

i want to reference the above rules somewhere in my document but every time i call only section number is displayed

cgnieder
  • 66,645

1 Answers1

2

a label must be associated with a counter.

description list items don't have counters.

so the most recent counter is attached to the label; that counter could be a section, a figure, an equation, ..., but not a description item.