From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62972 Path: news.gmane.org!not-for-mail From: Steffen Wolfrum Newsgroups: gmane.comp.tex.context Subject: Re: hyphenated url Date: Wed, 27 Oct 2010 12:35:30 +0200 Message-ID: References: <51241DF1-574E-4677-AED5-0D01225C8635@st.estfiles.de> <410FAACA-2464-45B1-AF91-3DD176102EAE@st.estfiles.de> <20101025224952.GD26195@aides> 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="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1288175759 8701 80.91.229.12 (27 Oct 2010 10:35:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2010 10:35:59 +0000 (UTC) Cc: Hans Hagen To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 27 12:35:57 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 1PB3MH-0003rv-F7 for gctc-ntg-context-518@m.gmane.org; Wed, 27 Oct 2010 12:35:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AC9F9CA79B; Wed, 27 Oct 2010 12:35:52 +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 tFssKaj7BptN; Wed, 27 Oct 2010 12:35:49 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83AA9CA790; Wed, 27 Oct 2010 12:35:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 11EE5CA790 for ; Wed, 27 Oct 2010 12:35:48 +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 rx8wwsXUSKvS for ; Wed, 27 Oct 2010 12:35:33 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 30557C9A7C for ; Wed, 27 Oct 2010 12:35:33 +0200 (CEST) Original-Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.31]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9RAZWqc032662 for ; Wed, 27 Oct 2010 12:35:32 +0200 Original-Received: from [89.247.120.15] (helo=[192.168.1.4]) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1PB3Lv-0000YW-OO; Wed, 27 Oct 2010 12:35:31 +0200 In-Reply-To: <20101025224952.GD26195@aides> 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.31.31; 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: 0eDnKzwO2 - df55434ca217 - 20101027 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:62972 Archived-At: Am 26.10.2010 um 00:49 schrieb Philipp Gesang: > On 2010-10-25 <17:00:39>, Aditya Mahajan wrote: >> On Mon, 25 Oct 2010, Steffen Wolfrum wrote: >> = >>> = >>> Am 25.10.2010 um 19:30 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 >>>> = >>>> An extreme solution: >>>> = >>>> \startcatcodetable \txtcatcodes >>>> \catcode`\^^I =3D 10 >>>> \catcode`\^^M =3D 5 >>>> \catcode`\^^L =3D 5 >>>> \catcode`\ =3D 10 >>>> \catcode`\^^Z =3D 9 >>>> \catcode`\\ =3D 0 >>>> \catcode`\{ =3D 1 >>>> \catcode`\} =3D 2 >>>> % \catcode`\% =3D 14 >>>> \stopcatcodetable >>>> \starttext >>>> \asciimode >>>> text\footnote{test \hyphenatedurl{www.test%it.com} test.} text. >>>> \stoptext >>> = >>> = >>> = >>> As I don't have any experience with "\asciimode" "I am not sure if I ca= n map this entirely on a complex book project... >> = >> In addition to usual asciimode, I changed the definition so that % >> does not have its usual meaning. So, % is no longer a comment; it >> just typesets percentage sign. You can get a comment using >> = >> \starthiding ... \stophiding. >> = >>> Any known side-effects? >> = >> * You need to use \math{...} to go into math mode. $ will just give >> a dollar. >> = >> * You need \startformula ... \stopformula to go into display math. >> $$...$$ will just print dollars. >> = >> * _ in text mode will produce an underscore instead of an error. _ >> in math mode will work fine. The same for ^. >> = >> * You need >> = >> \starttex(something) (I don't remember on the top of my head) >> \def\whatever#1{...} >> \stoptex(something) >> = >> to change the definition of a macro. >> = >> I have never really tested it on a large document. Maybe you can >> just add this and see if everything compiles. > = > Hi Aditya, Steffen and others, > = > I was toying around with catcode tables too. Shouldn=92t it suffice > to simply change % to =91other=92? This way you can keep the dollar > style math. > = > Philipp > = > =B7=B7=B78<=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7 > = > \setupinteraction[state=3Dstart] > = > \unprotect > \newcatcodetable \urlcatcodes % ordinary \ctxcatcodes except for minor ch= anges > \startcatcodetable \urlcatcodes > \catcode`\^^I =3D 10 > \catcode`\^^M =3D 5 > \catcode`\^^L =3D 5 > \catcode`\ =3D 10 > \catcode`\^^Z =3D 9 > \catcode`\\ =3D 0 > \catcode`\{ =3D 1 > \catcode`\} =3D 2 > \catcode`\$ =3D 3 > \catcode`\& =3D 4 > \catcode`\# =3D 6 > \catcode`\^ =3D 7 > \catcode`\_ =3D 8 > \catcode`\~ =3D 13 > \catcode`\| =3D 13 > \catcode`\% =3D \@@other > \catcode`\* =3D \@@comment % comment this out if you don=92t need li= ne comments > \stopcatcodetable > = > \protect > = > \starttext > = > \bgroup > TEST > \setcatcodetable \urlcatcodes > \hyphenatedurl{www.test%it.com} > * this should be treated as comment > \footnote{ > \hyphenatedurl{www.test%it.com} > } > Math mode: $(x)(y)\,(Fx\,.\,x=3Dy\,.\supset\,Fy)$ > TEST > \egroup > = > \stoptext > = > =B7=B7=B78<=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7 Hi Hans and other catcode wizards, isn't there a way to make this kind of catcode trickery only be available *= inside* \hyphenatedurl{} environment? Steffen ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________