# Referencing to a subsection with numbers and not the subsection name

Assume

 \section{first}
\subsection{first-1}
\label{marker}
\section{MySecondSection}
In section ~\nameref{marker} we defined...


In the output I see:

In section first-1 we defined...


However I want the section number. Like:

In section 1.1 we defined...

-

## migrated from stackoverflow.comJul 3 '12 at 18:09

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Jul 3 '12 at 18:13

Just use plain \ref to get the number.