TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to get more complete references

\ref itself only prints the number of whatever I am referencing - e.g. a chapter/section/subsection or a theorem/lemma/definition (from amsthm via \newtheorem).

I would like to have a command which prints also what the \ref-number actually is. Right now, I am doing it manually as in "in lemma \ref{...}" or "in section \ref{...}".

Sometimes I move a \label somewhere else or make the labeled lemma a theorem or so and I don't want to search manually through the rest of my code to update it (section -> chapter, lemma -> theorem, ...).

share|improve this question

marked as duplicate by Werner, Ulrich Schwarz, yo', egreg, Joseph Wright Jul 10 '12 at 8:09

This question was marked as an exact duplicate of an existing question.

We ought to add this one to the FAQ, or make a "sticky" question somehow that floats to the top. It is surely our most FAQ. – Ryan Reich Jul 10 '12 at 5:11
@RyanReich There are a good dozen of "repetitive questions". And this is only 3rd question linked to "How to get more complete references". – yo' Jul 10 '12 at 6:19
@tohecz Perhaps it's just bias, but it seems like this one comes up every other week. Not that it's a bad question; just that it's a very popular one. – Ryan Reich Jul 10 '12 at 6:38

Seems I was too stupid to search. It looks like the package cleveref does mostly what I want.

share|improve this answer

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