2

I would like to add link to video in the same folder where pdf document is stored. There is code:

\documentclass[a4paper,10pt]{article}

\usepackage{hyperref}

\begin{document}

\href{run:film.mp4}{Movie}

\end{document}

When I compile it with PDFLatex, then everything is okey, I click the link in PDF document and video player starts to play the movie. But when I compile it with Xelatex, then when I click this link in PDF document, there is written that:

path/file:film.mp4 No such file.

The problem is that word "file:" is inserted before file name. How to solve this problem?

9
  • An equivalent document works for me with both XeLaTeX and pdfLaTeX. (TeXLive 2010 on a Mac). Is your TeX distribution up to date?
    – Alan Munn
    Jun 16, 2011 at 22:41
  • This is XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2010) -- I guess so.
    – scdmb
    Jun 17, 2011 at 8:58
  • all right I solved the problem, I used url package and it works for me.
    – scdmb
    Jun 17, 2011 at 10:11
  • So your example code wasn't actually sufficient to show the problem, which was caused by the specific URL that you were trying to link to.
    – Alan Munn
    Jun 17, 2011 at 10:17
  • 2
    Maybe your hyperref is old? Mine is 6.82g
    – Alan Munn
    Jun 17, 2011 at 10:35

1 Answer 1

2

Since your sample document worked fine for me with an updated TeXLive, it is likely that your TeX distribution is not completely up-to-date.

By putting \listfiles in the preamble, you can generate a complete list of all of the packages loaded. In this case, the relevant package is clearly hyperref. The version current at the time of this answer is 6.82g. Check the version that you have, and if it is an earlier version, you should update it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .