TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use \href to link local video files to my LaTeX document. The problem is that while the \url command works fine, the \href command (used with "run:") does not.

Case 1: The files do not have any extension

In this case, \url works just file without any problem. But \href complains about no application found for opening file of mimetype application/octet-stream.

Case 2: The file have the proper extension.

Again, \url works just file without any problem. This time the \href opens the proper application, but the applications almost always hangs.

So, the problem is either with the PDF Viewer (Okular) or LaTeX. Can anyone shed light on what is exactly going on here?

EDIT : The problems seems to be with Okular as such. The Evince document reader does not present any such problems even without file extensions. (However, without file extension, it uses the mimeinfo.cache and hence uses mplayer instead of VLC player as is there in my KDE enviornment.)

So, I guess this is a bug in Okular. I would like to report it there. I would like to get an idea on what should I tell them. So, my question is what is the difference between the code produced in PDF for \href and \url?

EDIT: Minimum Working Example

\author{Jayesh Badwaik}



{A Crash Course on Contour Integration Part One}

{A Crash Course on Contour Integration Part Two}


share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. In this case, make one MWE that has both \href and \url commands, pointing to files with and without extensions. I'm not sure what the run: URL scheme would be, for example. – Mike Renfro Apr 9 '12 at 13:27
ohk... will do!! – Jayesh Badwaik Apr 9 '12 at 15:29
up vote 5 down vote accepted

The manual of hyperref says:

\url{URL} Similar to \href{URL}{\nolinkurl{URL}}. Depending on the driver \href also tries to detect the link type. Thus the result can be a url link, file link, ..

With the command url you didn't specify the action run or file. All these methods are given in the documentation.

share|improve this answer
Thanks for the documentation. I searched for the document earlier, but apparently I got an abridged copy but it had the same title, so I thought that was the complete documentation, which was around 70 pages. I will read this one and let you know. – Jayesh Badwaik Apr 9 '12 at 17:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.