From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82301 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Automatic replacement? Date: Fri, 3 May 2013 16:05:37 +0200 Message-ID: References: <5183BA7E.4090804@mmnetz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1878626573==" X-Trace: ger.gmane.org 1367589966 28478 80.91.229.3 (3 May 2013 14:06:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 May 2013 14:06:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 03 16:06:07 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UYGcg-000497-G3 for gctc-ntg-context-518@m.gmane.org; Fri, 03 May 2013 16:06:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DC10E101E9; Fri, 3 May 2013 16:06:03 +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 i0rlhmBztGlq; Fri, 3 May 2013 16:06:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8A6F9101E5; Fri, 3 May 2013 16:06:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C9D2C101E5 for ; Fri, 3 May 2013 16:05:59 +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 2ZVV9KKBPo1M for ; Fri, 3 May 2013 16:05:55 +0200 (CEST) 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 839D7101E4 for ; Fri, 3 May 2013 16:05:45 +0200 (CEST) Original-Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r43E5ba1021100 for ; Fri, 3 May 2013 16:05:38 +0200 Original-Received: by mail-la0-f42.google.com with SMTP id fq13so1555476lab.1 for ; Fri, 03 May 2013 07:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=K6Q5Tfc8nvgI1qZHlGiryzDH/U4UsnEmPUdrAxSq8/8=; b=w2kq5jePRz0sKUn5rj4ISI91E5gnPGEzUe4wJMDsv9V1ylI0ISZzKMCGl9u8wLKMc1 52D/00xGP7P1oF5UjzWbes1s1yQfbhWBNuX0Up6fNfvdUHmcRSUTwlvZAnrRIwM6xMkb litxbkiDp/Hs20G1r1dvJ1pqrB582nRIa9cXLHkUVjEuOktnS3IdYR51ztj25yGXAJcg aOV6m8BjlusgzSLTHS+NqQfklElF6GPWamaJ8Lsp9DxRWWnX8NCYEeDn89twWVGHU77y LK7J8HssG41UqEpouPW+vUwS2WLrkNo8YA1xbkBHpkYCDWqiMNz0iyA9yuxtyiI0yFy8 rZPg== X-Received: by 10.112.162.40 with SMTP id xx8mr4330610lbb.30.1367589937402; Fri, 03 May 2013 07:05:37 -0700 (PDT) Original-Received: by 10.114.187.69 with HTTP; Fri, 3 May 2013 07:05:37 -0700 (PDT) In-Reply-To: <5183BA7E.4090804@mmnetz.de> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4010:c03::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VJvq5BjG - cb10a6766a3b - 20130503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82301 Archived-At: --===============1878626573== Content-Type: multipart/alternative; boundary=089e01161d8e6ad9de04dbd0d8ca --089e01161d8e6ad9de04dbd0d8ca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, May 3, 2013 at 3:24 PM, "H. =C3=96zoguz" wrot= e: > Is it possible to define an automatic replacement? > > I want to replace every > > =D8=A7=D9=84=D9=84=D9=91=D9=8E=D9=80=D9=87 > by > =D8=A7=D9=84=D9=84=D9=87=D9=90 > > First is a combination of letters, second is the correct arabic one-symbo= l > for the name "Allah". I know, I can do this in the editor, but would > helpful, if it is possible in the compiling. > > Huseyin > > \directlua{ local function replace_txt (buffer) buffer=3Dstring.gsub(buffer,"A","BB") return buffer end callback.register("process_input_buffer",replace_txt) } \starttext my text A \stoptext copied & pasted in real time at 16:04 on friday May 3 from the Hans's talk at bachotek 2013 about luatex and plain tex. Please test with your characters. -- luigi --089e01161d8e6ad9de04dbd0d8ca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Fri, May 3, 2013 at 3:24 PM, "H. =C3=96zoguz" <h.oe= zoguz@mmnetz.de> wrote:
Is it possible to define an automatic replac= ement?

I want to replace every

=D8=A7=D9=84=D9=84=D9=91=D9=8E=D9=80=D9=87
by
=D8=A7=D9=84=D9=84=D9=87=D9=90

First is a combination of letters, second is the correct arabic one-symbol = for the name "Allah". I know, I can do this in the editor, but wo= uld helpful, if it is possible in the compiling.

Huseyin


\= directlua{ local function replace_txt (buffer) buffer=3Dstring.gsub(buffer,= "A","BB") return buffer end
callback.register("process_input_buffer",replace_txt)
}

\startte= xt my text A \stoptext

copied &= ; pasted in real time at 16:04 on friday May 3 from the Hans's talk at = bachotek 2013 about luatex and plain tex.
Please test with your characters.
=C2=A0
--luigi
--089e01161d8e6ad9de04dbd0d8ca-- --===============1878626573== 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 ___________________________________________________________________________________ --===============1878626573==--