From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63140 Path: news.gmane.org!not-for-mail From: Steffen Wolfrum Newsgroups: gmane.comp.tex.context Subject: Re: hyphenated url Date: Sun, 31 Oct 2010 10:50:23 +0100 Message-ID: References: <51241DF1-574E-4677-AED5-0D01225C8635@st.estfiles.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288555312 19208 80.91.229.12 (31 Oct 2010 20:01:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 31 Oct 2010 20:01:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 31 21:01:48 2010 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 1PCe66-0000ck-Uz for gctc-ntg-context-518@m.gmane.org; Sun, 31 Oct 2010 21:01:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AB122CA80B; Sun, 31 Oct 2010 21:01:46 +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 Esszk84L+K+j; Sun, 31 Oct 2010 21:01:40 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6AD40CA7FD; Sun, 31 Oct 2010 21:01:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 00853CA7FD for ; Sun, 31 Oct 2010 21:01:39 +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 dSRlFjXMla9p for ; Sun, 31 Oct 2010 21:01:33 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 4B476CA7F7 for ; Sun, 31 Oct 2010 21:01:33 +0100 (CET) Original-Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.29.23]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9VK1VA8029964 for ; Sun, 31 Oct 2010 21:01:32 +0100 Original-Received: from [89.247.106.104] (helo=[192.168.1.4]) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1PCe5r-0002OB-Ee for ntg-context@ntg.nl; Sun, 31 Oct 2010 21:01:31 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Df-Sender: 698580 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.67.29.23; country=DE; region=02; city=Ismaning; latitude=48.2333; longitude=11.6333; http://maps.google.com/maps?q=48.2333,11.6333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0BDpw1w9T - c7ae6c54a742 - 20101031 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:63140 Archived-At: Am 31.10.2010 um 07:06 schrieb Aditya Mahajan: > On Mon, 25 Oct 2010, Steffen Wolfrum wrote: > >> Hi, >> >> the "%" is a frequently used character in URL. >> But \hyphenatedurl{} can deal with it ... >> >> Does someone has a fix? >> >> >> \starttext >> text\footnote{test \hyphenatedurl{www.test%it.com} test.} text. >> \stoptext > > This is more a proof of concept so I did not take care of the optional argument of \footnote. > > \newcatcodetable \mytxtcatcodes > \startcatcodetable \mytxtcatcodes > \catcode`\^^I = 10 > \catcode`\^^M = 5 > \catcode`\^^L = 5 > \catcode`\ = 10 > \catcode`\^^Z = 9 > \catcode`\\ = 0 > \catcode`\{ = 1 > \catcode`\} = 2 > \stopcatcodetable > > \def\dosingleasciigroup#1% > {\pushcatcodetable > \setcatcodetable \mytxtcatcodes > \def\next##1{#1{##1}\popcatcodetable}% > \next} > > \def\setasciicommand#1% > {\savenormalmeaning{#1}% > \def#1{\dosingleasciigroup{\csname normal\strippedcsname#1\endcsname}}} > > \setasciicommand\footnote > \setasciicommand\hyphenatedurl > > \starttext > \hyphenatedurl{http://www.google.com/some%20thing} > test \footnote{A footnote with a \bold{url} \hyphenatedurl{http://www.google.com/some%20thing}} > > \stoptext A very nice and clean solution! Is it also possible to adapt it to useURL? \setasciicommand\useURL test \useURL[one][http://www.google.com/some%20thing][][http://www.google.com/some%20thing] text Thanks a lot, Steffen ___________________________________________________________________________________ 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 ___________________________________________________________________________________