GeneralHyperref to create pdf file with the link to executable file

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sophea
Posts: 1
Joined: Sun Jul 04, 2010 10:52 am

Hyperref to create pdf file with the link to executable file

Post by sophea »

I want to have generate a pdf document from latex with a link so that when I click on the link, it will call the execuatable file in Ubuntutu Linux. Below is my latex source:

\documentclass[11pt]{article}
\usepackage{hyperref}
\usepackage{color}
\begin{document}
\href{run:./square}{Execute the file}
\end{document}

Where "square" is an object file that I compiled from square.cpp program using g++. I could run the square program in Ubuntu by opening the terminal and issue the command "./square"

After I pdflatex, it created a pdf file. I opened the file and click the link. It says that it can't find the file square. It seems that Acrobat Reader interpret ./ as current directory. Is there any ways to make it works.
Again, what I want is that when I click the link, it should run the object file "square"

Any suggestion for the other idea is also appreciated.

Thanks in advance for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Hyperref to create pdf file with the link to executable

Post by frabjous »

Yes, next let’s discuss how to create a link, which, when clicked, will erase the user’s harddrive.

I don’t know whether or not what you want is possible, but I certainly hope it isn’t!
Post Reply