From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63115 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: hyphenated url Date: Sun, 31 Oct 2010 02:06:58 -0400 (EDT) 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 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288505213 1462 80.91.229.12 (31 Oct 2010 06:06:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 31 Oct 2010 06:06:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 31 07:06:49 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 1PCR44-0002Rp-Vz for gctc-ntg-context-518@m.gmane.org; Sun, 31 Oct 2010 07:06:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E3603CA7FF; Sun, 31 Oct 2010 07:06:47 +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 CHpL+SetBJLq; Sun, 31 Oct 2010 07:06:44 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B8689CA7F2; Sun, 31 Oct 2010 07:06:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D0BF4CA7F2 for ; Sun, 31 Oct 2010 07:06:42 +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 KemdggfWS2zb for ; Sun, 31 Oct 2010 07:06:31 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 7C390CA7E7 for ; Sun, 31 Oct 2010 07:06:31 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9V66TAE018210 for ; Sun, 31 Oct 2010 07:06:30 +0100 Original-Received: FROM adi-laptop (bas3-montreal02-1096680238.dsl.bell.ca [65.94.3.46]) By hellskitchen.mr.itd.umich.edu ID 4CCD0763.F183B.2330 ; Authuser adityam; 31 Oct 2010 02:06:28 EDT In-Reply-To: <51241DF1-574E-4677-AED5-0D01225C8635@st.estfiles.de> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; 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: 0rDpi6tNP - 33c0185c469b - 20101031 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:63115 Archived-At: 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 Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________