# \hyperref to a \label doesn't work (“empty destination key”)

In one of my documents, I used the combination of \label with \hyperref. Now, I fail for some reason.

I included the package:

Created a label somewhere in my text:

\label{key1}

And referenced it from the text:

\hyperref[key1]{there}

But xelatex gives me this:

Package hyperref Warning: Empty destination name,
(hyperref)                using `UNDEFINED' on input line 66.

What am I doing wrong?

EDIT: Minimal working example:

\documentclass[a4paper, 12pt]{article}

\usepackage{xltxtra}

\begin{document}

Some text. \label{key1} Continuing.

Some more text (\hyperref[key1]{goto}).

\end{document}
-
Your MWE works fine for me. Pl. improve it to show the actual problem. –  Harish Kumar Apr 23 '12 at 8:19
@HarishKumar - what version of xelatex do you have? I have "XeTeX 3.1415926-2.2-0.9995.2". –  Rogach Apr 23 '12 at 8:21
@HarishKumar - That MWE actually shows my problem (on my machine) - the compiler outputs that error message, and link does not work. –  Rogach Apr 23 '12 at 8:21
@Rogach: My Xetex version is : This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9) (preloaded format=xelatex 2011.12.21) 23 APR 2012 13:55 entering extended mode. Looks like you have to update your distro. –  Harish Kumar Apr 23 '12 at 8:25
the repositories are out of date- your example works fine in the latest texlive. Please see Martin's answer to best-way-to-install-packages-for-texlive-in-ubuntu- you don't need to build the deb packages yourself, texlive 2011 comes with very easy executables that do all of the work –  cmhughes Apr 23 '12 at 8:59

The repositories are out of date- your example works fine in texlive 2011 available at

http://www.tug.org/texlive/acquire-netinstall.html

Please see Martin's answer to Best way to install packages for TeXLive in Ubuntu?

You don't need to build the deb packages yourself, texlive 2011 comes with very easy executables that do all of the work for you. Once you have texlive 2011 installed, you can update it using tlmgr update --self --all

-