GeneralLose part of hyperref link during dvi->pdf conversion

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Lose part of hyperref link during dvi->pdf conversion

Post by php1ic »

Compiling the MWE below, both links act as expected in the dvi file, with everything in the {} being clickable. However when I convert to pdf (dvi->ps->pdf) the "Fig." part of the first link stops being linked and clickable.

Code: Select all

\documentclass[a4paper]{article}

\usepackage{graphicx}
\usepackage{hyperref}

\begin{document}

\begin{figure}
\centering
\includegraphics{file.eps}
\caption{blah blah}
\label{label}
\end{figure}

\hyperref[label]{Fig.~\ref{label}} blah blah \hyperref[label]{php1ic's link} Blah blah blah Blah

\end{document}
Any ideas what's happening?

Thanks
Last edited by php1ic on Wed Dec 09, 2009 4:53 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Lose part of hyperref link during dvi->pdf conversion

Post by php1ic »

Reading the hyperref manual in more detail it looks like the internal cross-referencing re-writes the link as just the number

http://www.tug.org/applications/hyperref/manual.html
A typical use would be to write
\hyperref[other]{that nice section (\ref*{other}) we read before}

We want \ref*{other} to generate the correct number, but not to form a link, since we do this ourselves with \hyperref
Post Reply