Re: LyX, pdflatex and local hyperlinks
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 [18 Where 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
[Fwd: Re: LyX, pdflatex and local hyperlinks]
-- Nick Hopton, Caversham, Reading, England. ---BeginMessage--- Todd Denniston wrote: [...] 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. [...] Thanks for your interest Todd, in fact your test file worked. But what on earth could I have been doing wrong before? I thought I'd tried everything (the heap of trashed CDs in my waste bin is embarrassing). Many thanks, Nick. -- Nick and Anne Hopton, Caversham, Reading, England. ---End Message---
Re: LyX, pdflatex and local hyperlinks
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 [18 Where 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
[Fwd: Re: LyX, pdflatex and local hyperlinks]
-- Nick Hopton, Caversham, Reading, England. ---BeginMessage--- Todd Denniston wrote: [...] 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. [...] Thanks for your interest Todd, in fact your test file worked. But what on earth could I have been doing wrong before? I thought I'd tried everything (the heap of trashed CDs in my waste bin is embarrassing). Many thanks, Nick. -- Nick and Anne Hopton, Caversham, Reading, England. ---End Message---
Re: LyX, pdflatex and local hyperlinks
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<>.>> endobj.20 0 obj <<./D [18 Where 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<> the LyX box generates in LaTeX \url{./test/index.html} in PDF /Subtype/Link/A<> 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. It is annoying that I have to use xpdf to test this as evince does not follow links in pdf docs. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter test2.lyx Description: application/lyx
[Fwd: Re: LyX, pdflatex and local hyperlinks]
-- Nick Hopton, Caversham, Reading, England. --- Begin Message --- Todd Denniston wrote: [...] 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<> the LyX box generates in LaTeX \url{./test/index.html} in PDF /Subtype/Link/A<> 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. [...] Thanks for your interest Todd, in fact your test file worked. But what on earth could I have been doing wrong before? I thought I'd tried everything (the heap of trashed CDs in my waste bin is embarrassing). Many thanks, Nick. -- Nick and Anne Hopton, Caversham, Reading, England. --- End Message ---
Re: LyX, pdflatex and local hyperlinks
Sorry, I managed to reply to Uwe and not the list. -- Nick Hopton, Caversham, Reading, England. ---BeginMessage--- 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 [18 Where 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. -- Nick and Anne Hopton, Caversham, Reading, England. ---End Message---
Re: LyX, pdflatex and local hyperlinks
Sorry, I managed to reply to Uwe and not the list. -- Nick Hopton, Caversham, Reading, England. ---BeginMessage--- 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 [18 Where 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. -- Nick and Anne Hopton, Caversham, Reading, England. ---End Message---
Re: LyX, pdflatex and local hyperlinks
Sorry, I managed to reply to Uwe and not the list. -- Nick Hopton, Caversham, Reading, England. --- Begin Message --- 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<>.>> endobj.20 0 obj <<./D [18 Where 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. -- Nick and Anne Hopton, Caversham, Reading, England. --- End Message ---
Re: LyX, pdflatex and local hyperlinks
Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton wrote: Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. assuming your LyX produced PDF is in Directory1 have you tried something like: \href{./Directory2/index.html}{name} otherwise known as a relative link? works for me in a minimal test on Linux, using either the info above in ERT or putting the URL in using LyX's insert-URL. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
Re: LyX, pdflatex and local hyperlinks
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} regards Uwe
Re: LyX, pdflatex and local hyperlinks
Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton wrote: Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. assuming your LyX produced PDF is in Directory1 have you tried something like: \href{./Directory2/index.html}{name} otherwise known as a relative link? works for me in a minimal test on Linux, using either the info above in ERT or putting the URL in using LyX's insert-URL. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
Re: LyX, pdflatex and local hyperlinks
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} regards Uwe
Re: LyX, pdflatex and local hyperlinks
Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton wrote: Uwe Stöhr wrote: You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. Thanks again for this Uwe, now when I click on the link in the PDF, Explorer fires up and loads index.html. All very good, but the trouble 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. On the CD the link in the PDF will always point at drive F: which isn't where the HTML file will be (unless by some happy chance all of the people to whom I distribute the CD have drive F: as their CD-ROM drives). I know this isn't strictly a LyX problem, but any hints on a possible solution would be appreciated. I'm very reluctant to abandon the idea of using a LyX-generated PDF as a 'front page' for my project (it's genealogy, for the family). Regards, Nick. assuming your LyX produced PDF is in Directory1 have you tried something like: \href{./Directory2/index.html}{name} otherwise known as a relative link? works for me in a minimal test on Linux, using either the info above in ERT or putting the URL in using LyX's insert->URL. -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter
Re: LyX, pdflatex and local hyperlinks
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} regards Uwe
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: Thanks Uwe. My default browser is Firefox and following your suggestion when I click on the link in the PDF three instances of Firefox start up, but none of them display the required HTML file. Firefox starts up with the error message Firefox doesn't know how to open this address, because the protocol (f) isn't associated with any program. I use Firefox and never got this problem, so I expect that your Firefox is misconfigured or the registry settings are broken. Try to reinstall Firefox and it should work. regards Uwe
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: Thanks Uwe. My default browser is Firefox and following your suggestion when I click on the link in the PDF three instances of Firefox start up, but none of them display the required HTML file. Firefox starts up with the error message Firefox doesn't know how to open this address, because the protocol (f) isn't associated with any program. I use Firefox and never got this problem, so I expect that your Firefox is misconfigured or the registry settings are broken. Try to reinstall Firefox and it should work. regards Uwe
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: Thanks Uwe. My default browser is Firefox and following your suggestion when I click on the link in the PDF three instances of Firefox start up, but none of them display the required HTML file. Firefox starts up with the error message "Firefox doesn't know how to open this address, because the protocol (f) isn't associated with any program". I use Firefox and never got this problem, so I expect that your Firefox is misconfigured or the registry settings are broken. Try to reinstall Firefox and it should work. regards Uwe
LyX, pdflatex and local hyperlinks
Using LyX, pdflatex and the hyperref package I'm trying to produce a PDF that contains links to locally-stored files. What I want to do is to click on a link to an HTML file in the PDF and have it start my browser (Firefox) and then load the required HTML file. The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} This is a menace, can anyone suggest better ways of inserting links to local HTML files in PDFs? Any suggestions would be gratefully received. Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. regards Uwe
LyX, pdflatex and local hyperlinks
Using LyX, pdflatex and the hyperref package I'm trying to produce a PDF that contains links to locally-stored files. What I want to do is to click on a link to an HTML file in the PDF and have it start my browser (Firefox) and then load the required HTML file. The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} This is a menace, can anyone suggest better ways of inserting links to local HTML files in PDFs? Any suggestions would be gratefully received. Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. regards Uwe
LyX, pdflatex and local hyperlinks
Using LyX, pdflatex and the hyperref package I'm trying to produce a PDF that contains links to locally-stored files. What I want to do is to click on a link to an HTML file in the PDF and have it start my browser (Firefox) and then load the required HTML file. The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} This is a menace, can anyone suggest better ways of inserting links to local HTML files in PDFs? Any suggestions would be gratefully received. Regards, Nick. -- Nick and Anne Hopton, Caversham, Reading, England.
Re: LyX, pdflatex and local hyperlinks
Nick and Anne Hopton schrieb: The following, in ERT, almost works, but clicking on the link produced in the PDF starts three instances of Firefox, only one of which shows the required HTML file. \href{file://F:/Directory1/Directory2/index.html}{name} You can alternatively simply use: \href{F:/Directory1/Directory2/index.html}{name} This opens the file with the default program that is set in the registry as default viewer for html-files. regards Uwe