# Choosing what to \ref from a \newcommand

I have this definition in my class (thanks to this answer):

\newcommand\clause{%
\immediate\write\@auxout{\string\expandafter\gdef\noexpand\csname B@\the\c@subsection\string\endcsname{\the\c@paragraph}}%
...
\def\thesubsection{Cláusula \arabic{subsection}ª.}


That I use as kind of special subsection in my context (clauses of a contract). I found that if I do the following:

\clause \label{conditions} Some conditions and obligations here.

\clause Acording to \ref{conditions} bla bla bla.


I will get the \ref{conditions} command replaced by the full text "Cláusula 3ª." (or whatever the number happens to be), instead only getting the clause number, as I am used to with other stock classes. How can I modify these definitions to get only the clause number when referencing to it?

-
Normally one uses \thesubsection to produce just the numbers and the separators (for example 1.2). One loads a package like sectsty or titlesec to allow one to customize the way that number is printed in the subsection title. That is where one would add such things as Cláusula  before it and ª after it. To be honest, I have no idea what you are doing with this \clause command, which seems unconnected to this problem. –  Dan Dec 5 '13 at 5:23
Are all clause statements supposed to be numbered and generate the appearance of a subsection? –  Mico Dec 5 '13 at 6:44