Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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...
share|improve this question

migrated from stackoverflow.com Jul 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

1 Answer 1

up vote 5 down vote accepted

Just use plain \ref to get the number.

There is some information about how to use references here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.