My purpose is to create visual steps in proofs.
I cooked this from the environment description:
\documentclass{article}
\newcounter{subproofcount}
\newcommand{\thesubproffcount}{\arabic{subproofcount}}
\newcommand{\subprooflabel}[1]{\refstepcounter{subproofcount}(\roman{subproofcount}) \underline{\bf #1}}
\newenvironment{subproof}{\let\Olddescriptionlabel\descriptionlabel\let\descriptionlabel\subprooflabel \begin{description}\setcounter{subproofcount}{0}}{\end{description}\let\descriptionlabel\Olddescriptionlabel}
\begin{document}
Here is a proof.
\section{Title 1}
\section{Title 2}
\begin{subproof}
\item[\( A\) is open] \label{ITEMone}
Let \( \epsilon>0\) etc.
\item[\( A\) is bounded]
Suppose etc. Using \ref{ITEMone}
\end{subproof}
\end{document}
The items are correctly numbered:
My problem is that \ref{ITEMone} creates a reference to the section (i.e. "2" in this example) instead of a reference to the subproof item (i.e. (i) in the example).
EDIT: Best answer for my use case here : https://tex.stackexchange.com/a/697316/109167


descriptionenvironment instead of anenumerateenvironment?\refstepcounteris inside a group and\@currentlableis local to that group. It would probably be easier to create a new list environment from scratch.descriptionandenumerate.