From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88605 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: hyperlinks with special characters Date: Fri, 29 Aug 2014 21:52:33 +0200 Message-ID: <5400DA01.2070105@wxs.nl> References: <1693802.7mXudW1K6g@prash5> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1409341984 12521 80.91.229.3 (29 Aug 2014 19:53:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Aug 2014 19:53:04 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 29 21:52:58 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XNSEC-0004ZO-VM for gctc-ntg-context-518@m.gmane.org; Fri, 29 Aug 2014 21:52:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 73AEC10221 for ; Fri, 29 Aug 2014 21:52:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jFKKbhOjSBws for ; Fri, 29 Aug 2014 21:52:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8E02810223 for ; Fri, 29 Aug 2014 21:52:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 66208101E6 for ; Fri, 29 Aug 2014 21:52:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BjsGMpBn7uoc for ; Fri, 29 Aug 2014 21:52:39 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 1110F101E1 for ; Fri, 29 Aug 2014 21:52:39 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s7TJqbH7020540 for ; Fri, 29 Aug 2014 21:52:38 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.5a2) with ESMTP id 5953-1713362 for ; Fri, 29 Aug 2014 21:52:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <1693802.7mXudW1K6g@prash5> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=Provincie Overijssel; city=Zwolle; latitude=52.5125; longitude=6.0944; http://maps.google.com/maps?q=52.5125,6.0944&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RMIHQCR0 - f1da2028902e - 20140829 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88605 Archived-At: On 8/29/2014 7:48 PM, Prashanth N Rao wrote: > 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(...)]`? Hm, I can support properly nested () and {} but how about not balanced ... one way out is to support "" and '' special(operation) special(operation(whatever)) special(operation{argument,argument{whatever}}) special(operation{argument{whatever}}) special("operation(") special("operation(whatever") special(operation{"argument,argument{whatever"}) special(operation{"argument{whatever"}) I'll add that but it needs testing because the ref parser is already somewhat complex. > 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(...)]`? you can use: \letterpercent ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________