LaTeX forum ⇒ GeneralLink to Files with relativ path

LaTeX specific issues not fitting into one of the other forums of this category.
rodeobjoern
Posts: 1
Joined: Wed Oct 15, 2008 11:42 am

Link to Files with relativ path

Postby rodeobjoern » Wed Oct 15, 2008 11:48 am

Hello,

I am working on my master thesis and want to create documents in which external files like .jpg, .fig or .exe can be choosen by clicking on a hyperlink. Those Files should open than in the standard program choosen by the operating system. I managed to do so by using \href{file:///C:/...} but then the browser always pops up and of course I can just use the file on my computer. It does not work if I give an relative path like \href[/images/test.fig]{test.fig} and I would like not always having the browser poping up. Is there a smart solution in LaTex to handle this? Dos anybody know a solution? Hopefully someone can help me.

Greetings, Björn

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: Link to Files with relativ path

Postby corderin » Tue Dec 23, 2008 1:08 pm

Hi,

you can try using the hyperref package, it works at least with .pdf files.


\usepackage{hyperref}

\begin{document}

\href{./document_name.pdf}{Open this PDF}

\end{document}

where the pdf document you want to open should be placed in the same directory as your output file.

Regards.

PS:A solution to print images is by printing them as pdf and saving them in the same directory.

corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: Link to Files with relativ path

Postby corderin » Tue Dec 23, 2008 1:18 pm

For a .exe file, try copying for example the windows calculator .exe file to your directory.

Then typ:

\href{run:./calc.exe}{CALCULATOR}

it works fine, for movies or sounds you should use the multimedia package...

:)


Return to “General”

Who is online

Users browsing this forum: No registered users and 12 guests