[Tex/LaTex] Creating PDF with external link to open another PDF


I am preparing a PDF file which will be put on the web. People will access it and should be able to open other pdf files from my PDF.

My commands works well for local pdf:


This is no brainer and it works.

However, when I publish my pdf file and have all the additional files in the presentations directory, this command does not work online.

If I use the absolute link as below


it works. However, I need to be able to produce the pdf and then to store it onto a website with a relative link to the file. I am not able to "guess" the exact link that I will have to give.

I have tryed many usual short cuts:


but none of them works.

Is there a way to have a relative link which will open?

Best Answer

AFAIK this is not possible. What you can do is to create a special \href Command and use a switch to switch from the online to the local version. The ifthen package would be a good starting point.





Related Question