1

Until now, I have only used the hyperref packages for cross references. Occasionally, someone mentioned other packages like varioref, cleverref or zref, which offer superior functionality compared to hyperref.

When looking for recommendations which one to use, I have only found this and this thread, which are both relatively old. The solution from the latter to load cleverref after varioref and hyperref in order to fix their incompatibilities seams rather fragile.

According to the hyperref manual varioref is not supported. Why is that, since both are now maintained by the Latex3 Project Team?

Also there exists zref, which provides new mechanisms. So for a new user like me, there is quite a lot of confusion on what to use.

What are current best-pracices for cross referencing? I know that this is a little subjective, so please provide a good explanation why you are using the packages and what is your workflow when working with them.

marv
  • 2,099
  • 1
  • 7
  • 26
  • I'd say it depends on the specific functionality that you want to have. If you want custom properties for references then you can use zref, otherwise you are probably fine with hyperref. So the 'best practise' is to use whatever package has what you need at some moment. – Marijn Dec 21 '21 at 20:46
  • hyperref isn't really for cross references, \ref is a standard part of latex, hyperref makes them active links if you are making pdf or similar rather than on paper. Conversely packages like cleveref or varioref are not related to active links they are for generating link text so rather than \ref just making 2 for a reference to section 2 cleverref will generate the text Section 2 and varioref will generate things like .. below or .. on the previous page – David Carlisle Dec 21 '21 at 21:17
  • @DavidCarlisle thanks for clarifying. But in conjunction with hyperref, references produced with cleveref and varioref still generate active links right? Is it still possible to use all three packages, since I like some features of all of them? – marv Dec 21 '21 at 22:13
  • yes sure hyperref is in control of virtually all links in the sense of pdf or the web, whichever package you use. citation packages and reference packages are mostly orthogonal to that although as you noted it's hard to make all packages work together in all combinations that's sort of the aim and just documented where that's not currently possible. – David Carlisle Dec 21 '21 at 22:17
  • ok, I was just a little concerned, since the hyperref manual mentions that the varioref package is not supported. But I will try the combination with cleveref and see how good it works – marv Dec 21 '21 at 22:20
  • 2
    If you want to use the varioref, hyperref, and cleveref packages, they must be loaded in that order. On what basis do you judge this loading sequence to be “fragile”? – Mico Dec 22 '21 at 02:02
  • Maybe fragile is not the right word, I am not a native speaker. I find it at least a little weird, that the manual states varioref and hyperref are not compatible and loading another package is supposed to fix that – marv Dec 22 '21 at 07:40

0 Answers0