From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82312 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Automatic replacement? Date: Sat, 4 May 2013 09:11:44 +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 (Mac OS X Mail 6.3 \(1503\)) Content-Type: multipart/mixed; boundary="===============0799872820==" X-Trace: ger.gmane.org 1367651519 19567 80.91.229.3 (4 May 2013 07:11:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 May 2013 07:11:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat May 04 09:12:00 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 1UYWdS-0000ci-9A for gctc-ntg-context-518@m.gmane.org; Sat, 04 May 2013 09:11:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 501D1101E9; Sat, 4 May 2013 09:11:57 +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 rl4SlmUdopJP; Sat, 4 May 2013 09:11:55 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C1130101E5; Sat, 4 May 2013 09:11:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 59470101E5 for ; Sat, 4 May 2013 09:11:54 +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 NsqmQLP68wm2 for ; Sat, 4 May 2013 09:11:53 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 82E47101E4 for ; Sat, 4 May 2013 09:11:43 +0200 (CEST) Original-Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r447Bgfe018763 for ; Sat, 4 May 2013 09:11:42 +0200 Original-Received: by mail-ee0-f42.google.com with SMTP id c13so1076948eek.29 for ; Sat, 04 May 2013 00:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:message-id:mime-version:subject:date :references:to:in-reply-to:x-mailer; bh=wrs9FzgrZrYd07Rs/hRID2Kj9FEQgWjgByB3ZQIeooA=; b=ucWUimsl6p2q68H26K7SkgWu8Iv42tdTJaFt1Nl/H4Rj+lgZrY4dGAUAkiPAibVdP9 m1SByvlZL1g9SVuCd2z79aKrXe94n+HJT2wl4IU592Eb5WQwRjE3IUbudIm/FZZmKh0P 8Odm0/Djxws9NfFRIVFkD/JvmX9kzAv/uS8lN6ZGBOpaiAKvIgLouTN6Q8gOeBtN1sxN Yn/WJaaiL0dcc6W1wKC2AsFpPCd8asLUfyo+lkv3xUmH2O+r168Qzw8JA5WuYosyte/F KsSMiat5ywHHp6oOKJ4GM3JwCVHVQ8vRQB54wewTALhJhi+OFbYyv0Y1KHCUX3Ht3tEf 499A== X-Received: by 10.14.205.194 with SMTP id j42mr15543105eeo.41.1367651502307; Sat, 04 May 2013 00:11:42 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbfb230.pool.mediaWays.net. [77.191.178.48]) by mx.google.com with ESMTPSA id bn53sm20145356eeb.7.2013.05.04.00.11.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 04 May 2013 00:11:41 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.42; 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: 0RJvHbGhi - b0bad2ea8a1b - 20130504 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:82312 Archived-At: --===============0799872820== Content-Type: multipart/alternative; boundary="Apple-Mail=_E581AA76-455C-471B-B293-C0510A193C90" --Apple-Mail=_E581AA76-455C-471B-B293-C0510A193C90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Am 03.05.2013 um 16:05 schrieb luigi scarso : >=20 >=20 >=20 > On Fri, May 3, 2013 at 3:24 PM, "H. =C3=96zoguz" = wrote: > Is it possible to define an automatic replacement? >=20 > I want to replace every >=20 > =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 >=20 > 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 would helpful, if it is possible in the compiling. >=20 > Huseyin >=20 >=20 > \directlua{ local function replace_txt (buffer) = buffer=3Dstring.gsub(buffer,"A","BB") return buffer end=20 > callback.register("process_input_buffer",replace_txt) > } >=20 > \starttext my text A \stoptext=20 >=20 > 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. \usemodule[translate] \starttext \translateinput[Apple][Orange] \enableinputtranslation Apple, Banana and Strawberry. \stoptext Wolfgang --Apple-Mail=_E581AA76-455C-471B-B293-C0510A193C90 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 luigi.scarso@gmail.com>:



On Fri, May 3, 2013 at 3:24 PM, "H. =C3=96zoguz" = <h.oezoguz@mmnetz.de> wrote:
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-symbol 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.

\usemodule[tra= nslate]

\starttext

\tran= slateinput[Apple][Orange]

\enableinputtranslation=

Apple, Banana and = Strawberry.

\stoptext

Wo= lfgang

= --Apple-Mail=_E581AA76-455C-471B-B293-C0510A193C90-- --===============0799872820== 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 ___________________________________________________________________________________ --===============0799872820==--