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}


  • 2
    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. Apr 9 '12 at 13:27
  • 1
    ohk... will do!!
    – user7013
    Apr 9 '12 at 15:29

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.

  • 1
    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.
    – user7013
    Apr 9 '12 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy