From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72413 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: url: Add macros to the ConTeXt core Date: Mon, 14 Nov 2011 04:42:54 -0500 (EST) Message-ID: References: <1321209489.3396.44.camel@mattotaupa> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1202214097-1321261978=:25495" X-Trace: dough.gmane.org 1321263625 9324 80.91.229.12 (14 Nov 2011 09:40:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2011 09:40:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 14 10:40:21 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RPt1Y-0004Yt-7P for gctc-ntg-context-518@m.gmane.org; Mon, 14 Nov 2011 10:40:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9FE0BCB0DD; Mon, 14 Nov 2011 10:40:18 +0100 (CET) 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 f7zo20koBrH4; Mon, 14 Nov 2011 10:40:12 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C2230CB0DE; Mon, 14 Nov 2011 10:40:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7F7EFCB0DE for ; Mon, 14 Nov 2011 10:40:10 +0100 (CET) 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 1Lv78xap6QHM for ; Mon, 14 Nov 2011 10:40:08 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id DDAAFCB0DD for ; Mon, 14 Nov 2011 10:40:07 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAE9e5Nr014484 for ; Mon, 14 Nov 2011 10:40:06 +0100 Original-Received: FROM adi-laptop (bas3-montreal02-1096680562.dsl.bell.ca [65.94.4.114]) By hackers.mr.itd.umich.edu ID 4EC0E1F3.EB9D1.20273 ; Authuser adityam; 14 Nov 2011 04:40:04 EST In-Reply-To: <1321209489.3396.44.camel@mattotaupa> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) Content-ID: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FUVE59d - b8876b4b5314 - 20111114 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72413 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1202214097-1321261978=:25495 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; FORMAT=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Sun, 13 Nov 2011, Paul Menzel wrote: > > looking into typesetting URLs I find typesetting URLs quite cumbersome. > > Maybe I have not used that feature that often so I am not seeing the > advantage to first define a URL somewhere and give it a name > > \useURL[aurl] [http://xkcd.com/149/] [] [I prefer hot > dogs.] > > and then later use it. > > \url[aurl] You just showed below why this is useful, by first using the urls ... > The proposed macros(?) in the section =BBTipps and Tricks=AB [2] > [snip] and then defining them. > [1] http://wiki.contextgarden.net/url > [2] http://wiki.contextgarden.net/url#Tipps_and_Tricks ConTeXt is just doing the reverse: first define the urls and then use=20 them :) I support having commands which typeset the urls directly, but the macros o= n the wiki are not the best ones. > \def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]} Why not simply: \def\href#1#2{\goto{#2}[url(#1)]} Or did I miss something? > \def\ahref#1{\color[linkcolor]{\ttx \href{#1}{<#1>}}} > \def\fullahref#1{\color[linkcolor]{\ttx \href{#1}{http://#1}}} These could be easily wrapped around using \useURL and \url (perhaps by add= ing left and right keys to \setupurl) but \url does not create a hyperlink: http://archive.contextgarden.net/message/20110915.115247.f23c2aad.en.html > \def\mailto#1{\useURL[#1][mailto:#1][][#1]\from[{#1}]} > \def\MailTo#1#2{\useURL[#1][mailto:#1][][#2]\from[{#1}]} Aditya --8323328-1202214097-1321261978=:25495 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --8323328-1202214097-1321261978=:25495--