I've been trying to get a hyperlinked table of contents working with a preexisting large book project. I've tried hyperref, and have had problems getting it to work right. In case it's of interest, I'll append a brief description of the problems, but the long and the short of it is that I'm getting the impression of hyperref as a big, complex, fragile package that includes a lot of unrelated functionality such as PDF titling, and I don't want to use it. Is there any alternative that will allow me to do something more low-level and just generate the hyperlinks I want? All I want is something like this:
\target{about-socrates}Socrates was sentenced to execution by drinking hemlock.
...
We recall that \href{about-socrates}{Socrates} drank hemlock.
That's all I need. I don't need it to do any styling of links for me (colors, boxes, etc.) — I can handle that myself. I only need it to work with PDF output, not DVI, HTML, etc. I don't need it to automatically generate hyperlinks in the TOC; I think I can do that myself as well.
Description of the problems with hyperref (probably irrelevant)
I get a cryptic error message if I invoke hyperref after all other packages (! Package hyperref Error: This should not happen! (hyperref) Missing version of 'hpdftex.def'.
), and although this error goes away if I invoke it before other packages, then some of the page numbers it links to are wrong. Unfortunately I have not had any luck getting a MWE to demonstrate either problem.
Best Answer
You can use the
navigator
package.Using
navigator
, the code snippet you included above would look like