# How to make \ref references include the word 'Figure'? [duplicate]

I'm using the package hyperref. When referencing my figure, I currently use code like

Figure \ref{fig:chorus-overview} gives an overview of the basic concept.


because \ref will just yield a single integer 1, as opposed to Figure 1.

However, the word Figure is auto-generated for the figure environment caption, so when using a package such as [ngerman]{babel}, it's Abbildung instead, and I need to fix the text before my reference.

Is there any way to directly get the Figure 1 text via \ref or a similar command?

EDIT

Additionally to the steps described in Sveinung's answer (using \autoref from hyperref or \cref from cleveref), I needed to make sure to place the label before the caption in the figure environment, as pointed out by Werner, and to include babel before hyperref/cleveref.

\nameref does not do what I need, since it copies the text of the caption instead.

-

## marked as duplicate by Werner, Thorsten, lockstep, barbara beeton, Torbjørn T.Jul 8 '12 at 14:49

Since the question most likely has something to do with the placement of labels, and/or babel options, it is probably not an exact duplicate. –  Sveinung Jul 8 '12 at 14:32
+1 for mentioning that the label needs to go before the caption. –  Will May 2 at 17:07

Load the package cleveref in your preamble and change your \ref{label} to \cref{label}. As egreg emphasizes, the package cleveref must be loaded after hyperref.

Or you may change your \ref{label} to \autoref{label}. See the hyperref manual page 15.

If I misunderstood you, and the problem is that you want the English word Figure instead of the German word Abbildung, you have two possibilities:

1. Either load babel with the option UKenglish instead of ngerman if your text is in English.
2. If your text is in German, but you still want to use the English word figure, you can use the babel-environment \begin{otherlanguage} before your figure, see the babel-manual page 6 (use texdoc babel at a command prompt).
-
The package cleveref must be loaded after hyperref. Just a reminder, but it's important because usually it's the other way around and people don't read manuals. :) –  egreg Jul 8 '12 at 14:11
@mic_e: This may be because you have your \label and \caption command inverted. See Where to put the \label on a figure environment? –  Werner Jul 8 '12 at 14:20
Then it is most likely a misplaced \label, see @Werner's comment. I suggest you try to make an minimal working example (MWE) –  Sveinung Jul 8 '12 at 14:33
I've solved the problem now. I made two mistakes: First, I included hyperref before including babel, and second, I placed \label before \caption. Thanks for your help. –  mic_e Jul 8 '12 at 14:37
@mic_e Note that, with some exceptions such as cleveref, hyperref should be loaded as the last package. See Which packages should be loaded after hyperref instead of before? –  Torbjørn T. Jul 8 '12 at 14:52