Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{hyperref}
\title{Whatever}
\author{Jayesh Badwaik}

\begin{document}

\maketitle

\href{run:raw/e68.ogv}
{A Crash Course on Contour Integration Part One}

\href{run:raw/5b}
{A Crash Course on Contour Integration Part Two}

\url{raw/e68.ogv}
\url{raw/5b}

\end{document}
share|improve this question
1  
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

1 Answer 1

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

 
discard

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.