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

I have some hyperlink problems in a PDF that I appear to be able to solve by adding \hypersetup{naturalnames=true} to my .tex file. What might go wrong by adding this command? The text of my paper doesn't appear to have changed, and the links that went to the wrong places before now go to the right places, but might some other links go to the wrong places without warning?

I don't have a short example to show; I'm just wondering if there are any common problems to look out for.

share|improve this question
up vote 5 down vote accepted

To cite the hyperref manual:

"Anything which can be referenced advances some counter; we overload this to put in a hypertext starting point (with no visible anchor), and make a note of that for later use in \label. This will fail badly if \theH<name> does not expand to a sensible reference. This means that classes or package which introduce new elements need to define an equivalent \theH<name> for every \the<name>. We do make a trap to make \theH<name> be the same as \arabic{<name>}, if \theH<name> is not defined, but this is not necessarily a good idea. Alternatively, the naturalnames option uses whatever LaTeX provides, which may be useable. But then its up to you to make sure these are legal PDF and HTML names. The hypertexnames=false option just makes up arbitrary names." (Emphasis mine)

Apart from the legality of the LaTeX label names used with option naturalnames=true, the labels may not be unique. The following code has broken links with naturalnames=true, but works without this option. You might blame subfig here, but that is something to look out for. However, you will get a warning when naturalnames introduces new problems.


% \usepackage[naturalnames=true]{hyperref}     %% does not work
\usepackage{hyperref}                          %% works


    \subfloat[][]{Ding\label{subfig:11}} \hfill

    \subfloat[subfig:21][]{Dong\label{subfig:21}} \hfill
Subfigures~\ref{subfig:11}, \ref{subfig:12}, \ref{subfig:21}, \ref{subfig:22}.
share|improve this answer

Your Answer


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.