Page 1 of 1
Make hyperlinks from HTML
Posted: 2012-03-09 04:18:52
by chazzo
I have a document that's full of hyperlinks in full HTML form:
Code: Select all
... for more information see <a href="http://example.com">this fine website</a>.
and I'd like to convert these to embedded NWP links:
Could some kind person suggest a macro to do this?
I guess the macro would need to handle the case where the link text is the same as the URL:
Code: Select all
... for more information see <a href="http://example.com">http://example.com</a>.
and it might also be handy to have the option of converting plain URLs without the full <a href=...>...</a>:
Would anyone else find this useful?
Thanks
Charles
Re: Make hyperlinks from HTML
Posted: 2012-03-09 13:50:35
by martin
I'm attaching a macro that scans for the kinds of links you describe. It's a little picky about its matching, eg: the opening <a> tag must not have any other attributes besides "href", and the URL must be enclosed in straight quote marks. But hopefully you find it useful!
Re: Make hyperlinks from HTML
Posted: 2013-02-21 04:13:28
by chazzo
Martin: for some reason I missed your reply. I'm sorry not to have thanked you before. That's very useful!
Re: Make hyperlinks from HTML
Posted: 2013-02-21 19:12:59
by martin
No problem, I'm glad it was helpful!
Re: Make hyperlinks from HTML
Posted: 2013-03-23 06:07:36
by nareng
Hello Martin,
Thank you very much for the HTML Macro!
When I write papers, my citation software (Bookends) is able to output:
<a href=”
http://www.ncbi.nlm.nih.gov/entrez/quer ... s=23207973 “>PubMed Link</a>
When I run your macro, the URL is made into a link.
Might you have a Macro that links 'PubMed Link' with the URL (
http://www.ncbi.nlm.nih.gov/entrez/quer ... s=23207973)
Thank you very much for any of your help!
Naren
Re: Make hyperlinks from HTML
Posted: 2013-03-23 06:22:04
by nareng
Hello Martin,
I am looking for a Macro for creating HTML link from <a href="http://abc">PubMedLink</a>, so that there is a link for "PubMed link' created using "
http://abc" but, "
http://abc" does not appear on the document. Do you have a Macro to do this, please?
Thank you
Naren
Re: Make hyperlinks from HTML
Posted: 2013-07-02 10:08:52
by martin
Hi Naren: I'm not sure I quite follow what you're trying to accomplish. Would you be able to attach a Nisus Writer file that shows a single example of the text before any link scanning takes place, and also shows the text how you'd like it to appear after a macro scan? The example wouldn't need to be a full document, just a snippet so it's clear what exactly you want to accomplish.