Nick Hopton wrote:
Subject: Re: LyX, pdflatex and local hyperlinks From: Nick and Anne Hopton <[EMAIL PROTECTED]> Date: Sat, 21 Jul 2007 17:16:15 +0100 To: Uwe Stöhr <[EMAIL PROTECTED]>To: Uwe Stöhr <[EMAIL PROTECTED]> Uwe Stöhr wrote:Nick and Anne Hopton schrieb:is that the drive letter (F:) is hard wired into the link. However, what I want to do is put the PDF file containing the link and the HTML file at which the link points onto a CD, but it doesn't seem possible to use relative paths in PDF links.Besides what Todd explained you can also simply put the html file in the same folder where the PDF is located. The \href call ise then simply\href{index.html}{name}I tried that Uwe, but it didn't work. However, I *think* I might have found a vile work-around by editing the URL in the PDF using a binary file editor, as follows:./Subtype/Link/A<</Type/Action/S/URI/URI(./front_page.htm)>>.>> endobj.20 0 obj <<./D [18Where the target is 'front_page.htm'. I have to test the CDs on a couple of other machines before I can be sure.Thanks to all, Nick.
what did the line in the PDF look like before you edited it? putting ./front_page.htm in a LyX URL box should have generated the pdf line you have above. Output from the attached lyx file: The ERT generates: in LaTeX \href{./test/index.html}{ERT} in PDF /Subtype/Link/A<</Type/Action/S/URI/URI(file:./test/index.html)>> the LyX box generates in LaTeX \url{./test/index.html} in PDF /Subtype/Link/A<</Type/Action/S/URI/URI(./test/index.html)>> at least on my Linux box.So I think you should be able to get where you want to go by using LyX's internal URL insert.
<gripe>It is annoying that I have to use xpdf to test this as evince does not follow links in pdf docs.
</gripe> -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
test2.lyx
Description: application/lyx