[OS X TeX] Hyperlink failure with TeXShop and Preview
Peter Dyballa
Peter_Dyballa at Web.DE
Sat Feb 10 18:01:01 CET 2007
Am 10.02.2007 um 08:43 schrieb Bruno Voisin:
> \newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{DOI:#1}}
>
> works, it writes the text "DOI:" followed by the DOI given as an
> argument, and makes the total a hyperlink to the URL of the
> document on the DOI proxy, namely "http://dx.doi.org/" followed by
> the DOI.
>
> [...]
>
> However, \doi{10.1002/1099-095X(200102)12:1<57::AID-ENV446>3.0.CO;
> 2-1} doesn't work in all cases: when viewing the PDF output in
> Adobe Reader, the corresponding text is indeed a hyperlink to
>
> http://dx.doi.org/10.1002/1099-095X(200102)12:1<57::AID-
> ENV446>3.0.CO;2-1
>
> which is a valid URL, but in both Preview.app and in TeXShop's
> Preview window the hyperlink appears to have no destination.
I played a bit with hyperref and this particular URL.
\href{http://dx.doi.org/10.1002/1099-095X(200102)12:1%3c57::AID-
ENV446%3e3.0.CO%3b2-1}{\url{http://dx.doi.org/10.1002/1099-095X
(200102)12:1<57::AID-ENV446>3.0.CO;2-1}}
works fine and so does
\href{http://dx.doi.org/10.1002/1099-095X(200102)12:1<57::AID-
ENV446>3.0.CO;2-1}{\url{http://dx.doi.org/10.1002/1099-095X(200102)
12:1<57::AID-ENV446>3.0.CO;2-1}}
because hyperref translates the inappropriate characters into
correctly escaped ones.
In my understanding your new command \doi{url} would expand to
\href{http://dx.doi.org/url}{DOI:url}
giving a floating hint of “DOI:url” for the reader, I mean that
supposedly human person. But this does not work. It seems that the
definition of \newcommand inhibits the complete effect of \href ...
look inside the PDF!
--
Greetings
Pete
A morning without coffee is like something without something else.
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list