Discussion:
[Skim-app-users] problem with hyperref and pdf file
Alain Matthes
2011-03-09 18:08:38 UTC
Permalink
Hello,

i compile with pdflatex this file :

\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\href[]{file:///Users/ego/Desktop/texteinv.pdf}{texteinv.pdf absolute path}
\end{document}

The link to texteinv.pdf works with Adobe Reader but not with Skim.
With Skim II have a correct link to a pdf file only with

\href[]{run:texteinv.pdf}{texteinv.pdf}

But ! No problem with a jpg file or a png file like this :

\href[]{file:///Users/ego/Desktop/bosch.jpg}{bosch.jpg absolute path}


Do you have an idea to resolve this problem (preview has the same problem)

Best regards

Alain Matthes
Christiaan Hofman
2011-03-09 18:34:41 UTC
Permalink
None of these work for me, and in fact cannot possibly work, because the links in the PDF are incomplete and even invalid. Your problem is that square brackets [..] in a latex command are for OPTIONAL options, and therefore should NOT be included when they're not present, i.e.

\href{file:///Users/ego/Desktop/texteinv.pdf}{texteinv.pdf absolute path}

Apart from that, I would never use a file URL in a link, use a link for a relative path.

Christiaan
Post by Alain Matthes
Hello,
\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\href[]{file:///Users/ego/Desktop/texteinv.pdf}{texteinv.pdf absolute path}
\end{document}
The link to texteinv.pdf works with Adobe Reader but not with Skim.
With Skim II have a correct link to a pdf file only with
\href[]{run:texteinv.pdf}{texteinv.pdf}
\href[]{file:///Users/ego/Desktop/bosch.jpg}{bosch.jpg absolute path}
Do you have an idea to resolve this problem (preview has the same problem)
Best regards
Alain Matthes
E***@web.de
2011-03-09 19:20:17 UTC
Permalink
Hi Christiaan,

when leaving the empty square bracktes out, it does not work either (at
least for me).

Why would you prefer relative paths above an absolute file link?
When the pdf created by latex is moved to another place, all links would be
broken.
(Sure, if the pdf shall be moved to another system, the relative paths have
their beauty, but IMHO it absolutely depends on the usage which alternative
makes more sense...)

BTW I also made a test with 2 links in a pdf:

that works, but it opens on page 1 and not on page 3
\href[page=3]{run://test.pdf}{relative path}

that does not work:
\href{/Volumes/Daten/test.pdf}{absolute path}

There seems to be a dependence on the pdf viewer:
Preview behaves like Skim (first one works, but only jumps to page 1, second
one does nothing).

In Acrobat Reader 7 (I only have the old one installed) it is the opposite:
the first one does not work, the second one works.

Kind regards

Martin
Antworten an: For general discussion about using Skim
Datum: Wed, 9 Mar 2011 19:34:41 +0100
Betreff: Re: [Skim-app-users] problem with hyperref and pdf file
None of these work for me, and in fact cannot possibly work, because the links
in the PDF are incomplete and even invalid. Your problem is that square
brackets [..] in a latex command are for OPTIONAL options, and therefore
should NOT be included when they're not present, i.e.
\href{file:///Users/ego/Desktop/texteinv.pdf}{texteinv.pdf absolute path}
Apart from that, I would never use a file URL in a link, use a link for a
relative path.
Christiaan
Christiaan Hofman
2011-03-09 21:50:38 UTC
Permalink
Post by E***@web.de
Hi Christiaan,
when leaving the empty square bracktes out, it does not work either (at
least for me).
Why would you prefer relative paths above an absolute file link?
When the pdf created by latex is moved to another place, all links would be
broken.
(Sure, if the pdf shall be moved to another system, the relative paths have
their beauty, but IMHO it absolutely depends on the usage which alternative
makes more sense...)
Because it ties your document to your particular document in a particular place on your particular home directory, so it's not portable.
Post by E***@web.de
that works, but it opens on page 1 and not on page 3
\href[page=3]{run://test.pdf}{relative path}
\href{/Volumes/Daten/test.pdf}{absolute path}
Preview behaves like Skim (first one works, but only jumps to page 1, second
one does nothing).
the first one does not work, the second one works.
Kind regards
Martin
Sorry, I get complete rubbish in the PDF, no valid links in the PDF data. In all of these cases.

Anyway, almost all of what you say is more about tex. I cannot tell you anything about that. I could tell you something about what Skim does with certain kinds of PDF, but I don't know what kinds of PDF links you're talking about.

And are you using the latest Skim?

Christiaan
Post by E***@web.de
Antworten an: For general discussion about using Skim
Datum: Wed, 9 Mar 2011 19:34:41 +0100
Betreff: Re: [Skim-app-users] problem with hyperref and pdf file
None of these work for me, and in fact cannot possibly work, because the links
in the PDF are incomplete and even invalid. Your problem is that square
brackets [..] in a latex command are for OPTIONAL options, and therefore
should NOT be included when they're not present, i.e.
\href{file:///Users/ego/Desktop/texteinv.pdf}{texteinv.pdf absolute path}
Apart from that, I would never use a file URL in a link, use a link for a
relative path.
Christiaan
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users
E***@web.de
2011-03-09 22:40:07 UTC
Permalink
Antworten an: For general discussion about using Skim
Datum: Wed, 9 Mar 2011 22:50:38 +0100
Because it ties your document to your particular document in a particular
place on your particular home directory, so it's not portable.
Sure, but the pdf containing the link is "portable" (in my local file
system).
Sorry, I get complete rubbish in the PDF, no valid links in the PDF data. In
all of these cases.
Anyway, almost all of what you say is more about tex. I cannot tell you
anything about that. I could tell you something about what Skim does with
certain kinds of PDF, but I don't know what kinds of PDF links you're talking
about.
OK, maybe you could tell us how the links have to be composed so that Skim
can open them. (with the default application for the file type which could
be skim in case of pdfs).
And are you using the latest Skim?
version 1.3.12 (62)

Martin
Christiaan Hofman
2011-03-09 22:54:06 UTC
Permalink
Post by E***@web.de
Antworten an: For general discussion about using Skim
Datum: Wed, 9 Mar 2011 22:50:38 +0100
Because it ties your document to your particular document in a particular
place on your particular home directory, so it's not portable.
Sure, but the pdf containing the link is "portable" (in my local file
system).
Sorry, I get complete rubbish in the PDF, no valid links in the PDF data. In
all of these cases.
Anyway, almost all of what you say is more about tex. I cannot tell you
anything about that. I could tell you something about what Skim does with
certain kinds of PDF, but I don't know what kinds of PDF links you're talking
about.
OK, maybe you could tell us how the links have to be composed so that Skim
can open them. (with the default application for the file type which could
be skim in case of pdfs).
AFAIK valid PDF links of all the types I know of work in Skim, and that's also my experience.

How to get them in TeX is a TeX question, and I can't help you there.
Post by E***@web.de
And are you using the latest Skim?
version 1.3.12 (62)
Martin
Loading...