# Referencing to Subsection

I have document with sections and subsections.

Problem is this one. When I use

Sec. \ref{x}


to reference subsection 1.1, of \label{x}, I get result

Sec 1 1.1


Ho to get correct

Sec 1.1


?

Coding here

\documentclass[aps]{revtex4-1}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\begin{document}
\section{My section}
\label{abc}
I wanna Sec\ref{def123}.
\subsection{\label{def123}My subsection}
\end{document}


the revtex aps style does not prefix the subsection numbers with the section number in the heading, so it adds it in references.

\documentclass[aps]{revtex4-2}
%\renewcommand{\thesection}{\arabic{section}}
%\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
%\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\begin{document}
\section{My section}
\label{abc}
I wanna Sec \ref{def123}.
\subsection{\label{def123}My subsection}
\end{document}


Publisher classes like revtex by design remove such choices from the author and enforce the journal style, so it is better to use a generic class such as article rather than redefine revtex internals to avoid this.