# Creating reference for command

I have a command that creates a formatted minipage that is defined roughly like

\newcounter{X}
\setcounter{X}{1}
\newcommand{\assumption}[2]{
\begin{minipage}%
Assumption \Roman{X}: #1 \\#2%
\end{minipage}%
}


I'd like to be able to reference the minipage command. Preferably using \ref, but this isn't nescessary. Basically I would like to be able to do something like

\assumption{flatearth}{The earth is flat!}{It is obvious that this
assumption is reasonable.}

From assumption \ref{assum:flatearth} it follows that it's \emph{real}
circumference is $\infty$ and that the Victoria was capable of
superluminal velocities.


or just have a command like \assref{flatearth}. They should produce roman numerals corresponding to the counter X.

Apologies for the ambiguous title, I've been trying to work out what to search for, it's not so clear.

-

\newcounter{X}
\renewcommand\theX{\Roman{X}}

\newcommand{\assumption}[2]{%
\refstepcounter{X}%
\label{assum:#1}%
\begin{minipage}%
Assumption \theX: #1 \\#2%
\end{minipage}%

}

-
Thanks. This is close to what I want, there is still one little bit wrong with it. The output from \ref{assum:whatever} is in Arabic not Roman numerals - is there any way of fixing this? –  Lucas Jul 13 '12 at 16:14
are you sure you ran latex again after adding the \renewcommand\theX{\Roman{X}} –  David Carlisle Jul 13 '12 at 16:18
A couple of times. I will do it a few more. Does it require the command \theX or \the<countername>? The latter it seems. Works now! Thanks. –  Lucas Jul 13 '12 at 16:31
once should be enough, Make a complete document "MWE" that shows the problem –  David Carlisle Jul 13 '12 at 16:34
\thecountername isn't really for references it defines how that counter is printed. references just happen to use the default print format of the counter by default –  David Carlisle Jul 13 '12 at 17:35