I would like to refer to all the items of an enumerate
environment, by applying a label to the list. I tried this
\documentclass{article}[10pt]
\usepackage{amsmath, hyperref, enumerate}
\begin{document}
\setcounter{section}{1}
\begin{enumerate}\label{listref}
\item Mary
\item Had
\item A little
\item Lamb
\end{enumerate}
The poem \eqref{listref} is one of the best known childrens' rhymes.
\end{document}
but that did not produce the result required. I think labelling the first and the last items on the list is an option, but I was wondering if there is a smoother way of doing this.
\eqref{listref}
produce? "Poem (1)" because the referredenumerate
environment is the first one in your document, or something else?\eqref{listref}
actually produces nothing, or, (Doc-start) depending on whether I use thehyperref
package or not..figure
environment and to provide a name for this figure with\caption
-- this way, you may refer to the figure.