From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4779 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re[2]: Active urls? Date: Thu, 31 May 2001 16:44:02 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20010531164402.01ac0aa0@server-1> References: <3.0.6.32.20010531095024.019ef500@server-1> <3.0.6.32.20010531095024.019ef500@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035395420 28689 80.91.224.250 (23 Oct 2002 17:50:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:50:20 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Giuseppe Bilotta In-Reply-To: <18415725155.20010531124626@bigfoot.com> Xref: main.gmane.org gmane.comp.tex.context:4779 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4779 At 12:46 PM 5/31/01 +0200, you wrote: > >Thursday, May 31, 2001 Hans Hagen wrote: > >HH> At 05:03 PM 5/30/01 +0200, Giuseppe Bilotta wrote: >>>Hello, >>> >>>I tend to use/give lots of URL references in my document. I >>>``recently'' discovered the full power of \useurl (even if I'm >>>still not sure about the three-entries syntax), but I'd like to >>>know if it is possible to make URLs active without resorting to >>>\from[...], that is: is there a setup option that allows \url[...] >>>to give an active hyperling? > >HH> probably something: > >HH> \let\normalurl\url > >HH> \def\url[#1]{\useurl[dummy][#1]\normalurl[dummy]} > >Uh ... that would let \url "merge" the functionality of \useurl >and \url, but that's not what I want. The problem is that if I >do: > >\useurl[whatever][this.net.address] > >\url[whatever] > >then \url[whatever] gives this.net.address, but it's not active, >while \from[whatever] gives this.net.address, active. > >\let\url=\from does not work. Any ideas? well, i lack the time to look into it more depply, but you probably end up with something hackery like: \setupinteraction[state=start] \useurl [abc] [a.b.c] \let\normalurl\url \unprotected \unexpanded\def\url[#1]% {\begingroup \let\url\normalurl \doifdefinedelse{\v!file:::#1} {\from[#1]} {\scantokens{\unprotect\useurl[\s!dummy][#1]\protect}% \from[\s!dummy]}% \endgroup} \starttext test \url[a.b.c] test \from[abc] \stoptext as said, too hackery, so why not change the \url's into \from's? Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------