From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50757 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: defineremapper as default (in style file) Date: Mon, 25 May 2009 12:23:51 +0200 Message-ID: References: <4A16EADB.9060209@wxs.nl> <4A1A7022.8020909@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1530686425==" X-Trace: ger.gmane.org 1243247153 17795 80.91.229.12 (25 May 2009 10:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 10:25:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 25 12:25:46 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1M8XNJ-0007Pw-Uj for gctc-ntg-context-518@m.gmane.org; Mon, 25 May 2009 12:25:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 752AE1FD59; Mon, 25 May 2009 12:25:44 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28315-06-9; Mon, 25 May 2009 12:24:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B46C41FBBD; Mon, 25 May 2009 12:24:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7BBE41FBBD for ; Mon, 25 May 2009 12:24:31 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07235-03-4 for ; Mon, 25 May 2009 12:23:55 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id 4FB9C1FBBA for ; Mon, 25 May 2009 12:23:53 +0200 (CEST) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.148]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4PANqQR005762 for ; Mon, 25 May 2009 12:23:52 +0200 Original-Received: by ey-out-1920.google.com with SMTP id 4so666310eyg.38 for ; Mon, 25 May 2009 03:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=HfstLAOzjdhPu38YsFyqqIWDjeEMa5eEXUjFUFanHe0=; b=eFPgQQOsP1JspdqvP9HV3WKGljlwmHGJgAnxWDsO8TrMu8/b3LccoqIaI3QO5iv/NJ 9Ynn1FBA+3E5KQMm3aqnCEo56zK30AB4m3Yr4q87YsFk9f4Lv8+oFmgIKt3iZY37+YUM 5dFIxfIw8tRNhvaorUTiXwWhhglazdgJBcXBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=NQdJLPAD9w38IvuZybQDK8Le81n/Ff/pM1EJSaZ1nbJtVMlqeX3pEf0K9wO+S14BxK ZhtbKXub1VmeeX/iZ9bkL/Ojlb3qqu4oOhgdcTmVl+AWLCI9/Pdx3HzlzVA11vndPSW3 TOWCfuaUDpF2PfxroPTVdLRy1KMF/XnQOPHf0= Original-Received: by 10.216.0.206 with SMTP id 56mr1571262web.102.1243247032024; Mon, 25 May 2009 03:23:52 -0700 (PDT) In-Reply-To: <4A1A7022.8020909@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.78.148; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 231132198 - 053c5d9bf103 - 20090525 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:50757 Archived-At: --===============1530686425== Content-Type: multipart/alternative; boundary=0016364ed9aeb643cd046aba0127 --0016364ed9aeb643cd046aba0127 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, May 25, 2009 at 12:17 PM, Hans Hagen wrote: > luigi scarso wrote: > >> On Fri, May 22, 2009 at 8:11 PM, Hans Hagen wrote: >> >> Peter M=C3=BCnster wrote: >>> >>> Hello, >>>> >>>> I would like to activate a remapper in a style or module file. How cou= ld >>>> this be done? >>>> >>>> I tried this without success: >>>> >>>> \defineremapper[filterItem] >>>> \remapcharacter[filterItem][`=E2=80=A2]{\item} >>>> \appendtoks \startfilterItem \to \everystarttext >>>> \prependtoks \stopfilterItem \to \everystoptext >>>> >>>> >> kep in mind that the remapper is just a hack and will not be extended e= tc >>> etc; i'm not going to handle interferences with other mechanisms >>> >>> >> Hans >>> >>> >> >> I think the point is this : >> in some situations one find useful to convert things like =E2=80=A2 in m= acros like >> \item . >> Of course, it can be done with preprocessing , or with some ad-hoc macr= os >> in lua code , etc >> So, apart \remapcharacter, are there any other safe ways to "remap >> character" ? >> > > one solution mentioned was making that character active and then do an > unexpanded def which makes it roundtrip safe; of course we should leave > characters like : untouched > there was an article many years ago something like "Active characters -- No thank you" > the remapper works on all input and it might result in unwanted side > effects .. imagine that someone defines symbol 1 as =E2=80=A2 and gets \i= tem instead > this is true -- it's not a general solution it's a trick , it if you abuse then.... > > > Hans > Maybe I'm not able to express what I mean . --=20 luigi --0016364ed9aeb643cd046aba0127 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Mon, May 25, 2009 at 12:17 PM, Hans H= agen <pragma@wxs.nl> wrote:
luigi scarso wrote:
On Fri, May 22, 2009 at 8:11 PM, Hans Hagen <pragma@wxs.nl> wrote:

Peter M=C3=BCnster wrote:

Hello,

I would like to activate a remapper in a style or module file. How could this be done?

I tried this without success:

\defineremapper[filterItem]
\remapcharacter[filterItem][`=E2=80=A2]{\item}
\appendtoks \startfilterItem \to \everystarttext
\prependtoks \stopfilterItem =C2=A0\to \everystoptext


kep in mind that the remapper is just a hack and will not be extended etc etc; i'm not going to handle interferences with other mechanisms


Hans



I think the point is this :
in some situations one find useful to convert things like =E2=80=A2 in macr= os like
\item .
Of course, it can be done with =C2=A0preprocessing , or with some ad-hoc ma= cros
in lua code , etc
So, apart \remapcharacter, are there =C2=A0any other safe ways to "rem= ap
character" ?

one solution mentioned was making that character active and then do an unex= panded def which makes it roundtrip safe; =C2=A0of course we should leave c= haracters like : untouched
=C2=A0
there was an article many years ago some= thing like "Active characters -- No thank you"


the remapper works on all input and it might result in unwanted side effect= s .. imagine that someone defines symbol 1 as =E2=80=A2 and gets \item inst= ead
this is = true -- it's not a general solution it's a trick , it if you abuse = then....


Hans

Maybe I'm not able to express what I= mean .
--
luigi

--0016364ed9aeb643cd046aba0127-- --===============1530686425== 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1530686425==--