[pdftex] relative link with hyperref
Hans-Joachim Frick
Hans-Joachim.Frick at gmx.de
Mon Oct 27 11:35:32 CET 2008
Hi!
The aim is, to do a relativ file link with pdflatex and hyperref(hyperref using driver hpdftex) with linux(Opensuse10.3) from a pdf document to html files in a subdirectory of the current directory.
The pdf document has to be portable to other platforms.
The working directory is /home/frick. The directory /home/frick/a contains a file index.html geogebra.jar and a *.ggb file for geogebra application.
The code for an absolute link is:
\documentclass[pdftex]{article}
\usepackage{hyperref}
\begin{document}
\href{file:///home/frick/a/index.html}{absolut}
\end{document}
With Acroread mouse over to the link open an window with the path file:///home/frick/a/index.html, the browser find index.html, and geogebra. Geogebra opens the *.ggb file. The adress in the browse is /home/frick/a/index.html.
For an relative link the code is:
\documentclass[pdftex]{article}
\usepackage{hyperref}
\begin{document}
\hyperbaseurl{file:///./} or
\hyperbaseurl{./} or i believe \hyperbaseur{anything}
\href{a/index.html}{relativ}
\end{document}
The window on acroread is file:////home/frick/a/index.html, one slash more then by the absolut link, the browser opened index.html and geogebra, but geogebra fails by opening the file://*.ggb. The adress in the browser is //home/frick/a/test.html.
By deleting one slash in the Browser-window, index.html, geogebra and *.ggb were founded.
I think by the relativ Link one slash is too much in the adress.
Do anyone have an idea, for changing the code, to work?
Yours sincerely
Hans
--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail
More information about the pdftex
mailing list