True WYSIWYG LaTeX System
Windows     Mac     Linux  

Topic Messages

2020/03/31 02:01:40 CEST
Martin J. Osborne    
Links to https URLs using hyperref

The links to URLs starting 'https' created by hyperref in a pdf file do not work: they point to files, not webpages. (I'm using BaKoMa version 11.) Has anyone else noticed that?

After a lot of sleuthing, I have managed to fix the problem by editing the header file PDF.PRO in the bakoma directory. A method in this file classifies a link as a URL if it starts with http or ftp. I don't have any links to ftp sites, so I replaced 'ftp:' with 'https:'. That solved the problem (after restarting BaKoMa). It would be better to edit the file so that it classifies, ftp as well as http and https correctly, but my facility with Postscript is too limited to do that without a lot of time-consuming trial and error. Does anyone know how to do it?

2020/04/01 10:34:26 CEST
Michael Gerfin    

Thanks, Martin, for this fix. This problem was driving me crazy the last couple of days (as if there is nothing else to worry about at the moment).
2020/04/01 15:13:35 CEST
Martin J. Osborne    

Glad to have been of help! There is one case my edit of PDF.PRO doesn't fix: clicking on the border of the first line of an https URL that is broken across lines picks up only the part of the URL on the first line. (If you hover around a URL, you'll see that when the mouse pointer is close to the edge of the URL text the mouse pointer is a hand (it's tricky to find the right spot for that), whereas when the mouse pointer is inside the area of the URL text the pointer is a hand with a W inside it.) I don't know why clicking on the border of a URL is different from clicking in the middle of the area of the URL.
2020/10/05 15:04:37 CEST
JnRc Lp    

Thank you so much Martin for your fix!!! I was struggling with this problem for so long!!! In case you want to keep FTP as well as HTTP and HTTPS I replaced in C:\BaKoMa.TeX\BaKoMa\ the corresponding lines (ln 198 ff) by : % V 5.0: Check that URI is specified. %(WARNING: ) print pstack CosObjects /Catalog get /URI knownget {/Base knownget{()ne}{false}ifelse} {false} ifelse /UseURI exch def UseURI not { dup (http:) anchorsearch { pop pop true } { (https:) anchorsearch { pop pop true } { (ftp:) anchorsearch { pop pop true } { (mailto:) anchorsearch {pop pop true} {pop false} ifelse } ifelse } ifelse} ifelse /UseURI exch def } if % /UseURI true def % AR don't support relative link in portable way. And it seems to work :-)
2020/10/05 15:11:43 CEST
JnRc Lp    

Big SORRY... I didn't know that all the code would be displayed on one line... :-( You can find the PDF.PRO file with the fix so nicely proposed by MARTIN + my little add here (works with HTTP, HTTPS, and FTP) (see ln 199 ff for the change).
2020/10/05 16:04:55 CEST
Martin J. Osborne    

Excellent!! Thank you, JnRc. (The page source (Ctrl-U in Chrome) shows the lines in your posting broken as you intended, and the email message notifying me of your post also shows them broken correctly. To make linebreaks show on the webpage, you need to add explicit HTML. But putting a link to the whole file, as you did, is even better --- thanks again.)
2020/10/06 03:03:26 CEST
Martin J. Osborne    

There is one other difference between your file and the one in my system: line 221 of your file says
/HyperFile exch UseURI not {fileadjust} if def
whereas the corresponding line in my file says
/HyperFile exch UseURI not {FStoBS} if def
I have BaKoMa version 11. What version do you have? Do you know what the line might mean? "fileadjust" and "FStoBS" don't seem to be PostScript primitives; maybe they are defined somewhere else in the BaKoMa system.
2020/10/06 08:49:53 CEST
JnRc Lp    

Hello Martin!
Thank you very much for your messages! and again a great thank you for your fix! It's so nice how it's working now!
Sorry I didn't mention the version I'm using :-) you can see that these are my first posts on the support :-)
I've just added a note in the Google Drive folder where I put the files to mention it: I'm using the last version: 11.80
For the difference in code, I unfortunately I don't know the meaning of "FStoBS" :-( really sorry
A very nice day to you and thanks again for your work and your sharing! Jean
2020/10/06 15:26:28 CEST
Martin J. Osborne    

Hi Jean. Thanks --- I'm using version 11.50 (I think I had trouble getting 11.80 to work), so probably the change from FStoBS to fileadjust is a bug fix or improvement. I'll see if the version with that code works in 11.50. Thank you for your improvement of the code!


You are already subscribed for notification about changes in this thread.

You can add own message by below form:

To add comment you must be signed at Support page.

Go to see list of topics