Preview won't open hyperlink in PDF to specific DOI

Hi all,


I've generated a PDF from markdown via Pandoc (using xelatex as the tex engine); the PDF includes URL hyperlinks. One of the hyperlinks is a specific DOI address: doi:10.2307/488160. In Adobe Acrobat Reader, this link accurately opens in Firefox (my default browser) and is then resolved using a DOI handler I have in firefox. Preview, however, will not open the link; when you click, you just get that error boing sound.


I believe this may have to do with security aspects of Preview that are baked in to the program—what sorts of external files Preview is able to open. There is a discussion of this here but it doesn't exactly answer my question: https://apple.stackexchange.com/questions/119299/why-preview-app-refuse-to-open- local-link-in-pdfs.


If this isn't a security aspect hardwired into preview, is there a way to adjust preferences regarding how preview treats links that begin with "doi:"? Any other ideas.


Related note: I know there is a better way to include DOIs in Tex docs (with the DOI package) than as URLs starting with "doi:" but I like to keep my markdown as plainly readable as possible and not include any latex markup in it. I could add a Pandoc filter to do this—but I'd rather figure out the problem from this end if possible.


Thanks!

MacBook Air (11-inch, Early 2014), OS X Yosemite (10.10.1)

Posted on Jun 20, 2016 8:32 AM

Reply
3 replies

Jun 23, 2016 12:55 PM in response to kjn111

...One of the hyperlinks is a specific DOI address: doi:10.2307/488160.


That DOI address as you present is only the persistent identifier. To make it a link, precede the string with the url http://dx.doi.org/ so that your example would be http://dx.doi.org/10.2307/488160


Basically, the url is a resolver. By including it for a DOI link, there is no need for the Firefox DOI handler/addon. You can have the text that is displayed differ from the url address. That is, the manuscript shows doi:10.2307/488160 but the underlying url link is http://dx.doi.org/10.2307/488160


You might check the particular style guide that you need to follow for display format specifications. For example, see the specifics for APA style.

Jun 23, 2016 12:46 PM in response to LilyLC

Thanks for the info, though unfortunately it doesn't answer the question, which basically boils down to, Why do Preview and Adobe Acrobat Reader exhibit different behavior when faced with the same underlying link?


I could hardcode an underlying link to http://dx.doi.org/10.2307/488160, as you suggest, in markdown, beneath the plain text required by Chicago style, doi:10.2307/488160. This would be something like "[doi:10.2307/488160](http://dx.doi.org/10.2307/488160)". But part of the point of using markdown is to produce human readable plain text and part of the advantage of Pandoc as a converter is that it will automatically turn text within angled brackets into a link, even if it's just a doi identifier such as <doi:10.2307/488160>. I would like if possible to keep my plain text as clearly readable as possible and take advantage of Pandoc's nice simple conversion, rather than this moderately verbose workaround. (Yes, this requires the Firefox add on handler that others might not have, but I'm betting on more and better DOI integration into address bars going forward rather than less.)


As PDF is an Adobe format, I assume their implementation of link behavior in Reader is pretty standard. I just wanted to know if there was a setting I could change to have Preview act similarly.


Anyway, I do very much appreciate your thorough and clear proposal. Thanks for it—it's a good fall back.

Jun 23, 2016 2:25 PM in response to kjn111

... unfortunately it doesn't answer the question, which basically boils down to, Why do Preview and Adobe Acrobat Reader exhibit different behavior when faced with the same underlying link?

. . .


As PDF is an Adobe format, I assume their implementation of link behavior in Reader is pretty standard. I just wanted to know if there was a setting I could change to have Preview act similarly.


You are correct, in that my response did not answer your question. I am far from an expert on the subject markdown and software development, so this still is not a definite answer. One difference between the two applications is that Adobe uses a number of plugins for the features and functions of many of their applications. The International DOI Foundation looked to Adobe's plugin protocols in developing doi services. (See Advanced DOI Functionality concept. Warning: link might auto-download the PPT.) Apple Preview only uses a plugin called "markup" that I think is for annotation functions. Another difference seems to be the metadata in a PDF that Adobe Acrobat/Adobe Reader recognizes that Apple Preview does not. See the Crossref article, Metadata in PDF. That said, it might a combination of plugins and metadata resulting in the different outcomes. Might the Pandoc user group be able to help with your question?


Thanks for the star. 😉

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Preview won't open hyperlink in PDF to specific DOI

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.