[NTG-context] hyperlinks with special characters

Prashanth N Rao prash.n.rao at gmail.com
Fri Aug 29 19:48:37 CEST 2014


I have already asked this question on Stackexchange. It appears that no one who has seen the question knows an answer. I figure I'll ask here too, just to cover all bases.

I need to link to some online resources in my PDF file. Based on the official documentation, I have written:

> \useURL[dbdk] [http://dbpedia.org/page/The_Dark_Knight_(film)] [] [it's link to DBPedia]
> 
> Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \from[dbdk] dolor sit amet.

Note my code for the link to DBpedia: I had to write it in this convoluted way, instead of using my preferred \goto, because the link has the special characters, `(` and `)`. These characters interfered with `url()`. I can't use HTML's URL encoding scheme because the `%`s interfere with TeX. Is there another escape code format in ConTeXt for use within `\goto{...}[url(...)]`?

Using the suggestion by @phg, I tried the following:

> \startasciimode
> Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \goto{it's link to DBPedia}[url(http://dbpedia.org/page/The_Dark_Knight_%28film%29)] dolor sit amet.
> \stopasciimode
I still had to use escape codes, `%28` and `%29`, to keep it from interfering with url(). It turns out that DBpedia does not like these codes, and requires the actual characters. Is there another way I put them in `\goto{...}[url(...)]`?

Thanks!
Prash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140829/5d776242/attachment.pgp>


More information about the ntg-context mailing list