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.

The documentation for hyperref reads:

hypertexnames -- boolean -- use guessable names for links

naturalnames -- boolean -- use LaTeX-computed names for links

And that's it. A question addresses the meaning of hypertexnames -- is naturalnames even a third naming scheme, or does naturalnames=true imply hypertexnames=false?

Perhaps related: Does this setting affect compatibility with other packages? Is it advisable to always include hyperref after all other packages, or are there exceptions?

share|improve this question
2  
For the last question, see tex.stackexchange.com/questions/1863/… –  Torbjørn T. Mar 21 '12 at 9:25
add comment

1 Answer

up vote 4 down vote accepted

The naturalnames option makes a difference when the hypertexnames option is set to true (which is the case by default). Essentially, setting the former to true may be useful if you are using a package that

  1. adds a cross-reference element (e.g. a new float type)
  2. is not allowed for by the hyperref package
  3. does not, itself, allow for the hyperref package.

To quote from the documented source code of the hyperref package:

Anything which can be referenced advances some counter; […]. This means that classes or packages 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 it’s up to you to make sure these are legal PDF and HTML names.

share|improve this answer
    
Later in the text it reads: "The hypertexnames=false option just makes up arbitrary names." Does this mean that naturalnames=false,hypertexnames=false is a sensible default settings to produce documents that "just work" but where the anchor names don't mean anything? Where would I see the anchor names anyway? –  krlmlr Mar 21 '12 at 13:51
    
@user946850: If hypertexnames=false, naturalnames has no meaning and the current link name (stored in \@currentHref) is not based on the value of a particular counter (such as figure or table), but on the value of the single internal counter \Hy@linkcounter. Obviously, this is the most elementary mode. Nonetheless, it should work as long as all computed link names are legal PDF and HTML names. –  mhp Mar 21 '12 at 14:40
    
"...as long as all computed link names are legal PDF and HTML names": How can the link names created with hypertexnames=false be not legal PDF or HTML names? Is this possible in theory/practice? –  krlmlr Mar 21 '12 at 15:01
    
@user946850: That’s a good point! In fact, I’m convinced now that they will always be legal. –  mhp Mar 21 '12 at 16:06
add comment

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.