I have an enumerate environment that I want to refer to later in my document using \ref and \label, but enumerate doesn't get numbered by section (the way, say, figure would). How can I add section numbers to enumerate?
I do not want individual, enumerated items to be numbered. Rather, I want the enumeration as a whole to be numbered.
What I am really looking for is something like this:
Algorithm 1.2
2. Buy Milk
3. Walk Home
... /snip/ ...
As described in Algorithm 1.2, it's easy to buy milk.
I don't want to use a figure because I can't have it moving around the document. I don't want to use the theorem/definition/proof environments because of all the styling. The algorithm environments use a lot of styling too. I'm basically looking for a way to slap a title on my enumerate environment and give it a number that I can refer to.
Edit:
This is what I finally ended up with, based on Mico's post:
\usepackage{amsmath}
\newcounter{algcounter}
\newenvironment{alg}{
\bigskip\noindent
\refstepcounter{algcounter}
\textbf{Algorithm \thealgcounter}
\newline
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{enumerate}}
\numberwithin{algcounter}{section}



ntheorempackage. – Aditya Feb 5 '12 at 15:44