From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82305 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Automatic replacement? Date: Fri, 3 May 2013 18:27:39 +0200 Message-ID: References: <5183D5B6.8040204@mmnetz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1129077553==" X-Trace: ger.gmane.org 1367598476 27237 80.91.229.3 (3 May 2013 16:27:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 May 2013 16:27:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 03 18:27:57 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 1UYIpx-0006Gb-A6 for gctc-ntg-context-518@m.gmane.org; Fri, 03 May 2013 18:27:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E9BC101E4; Fri, 3 May 2013 18:27:56 +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 grNXMHFtk8Wy; Fri, 3 May 2013 18:27:54 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 74091101E5; Fri, 3 May 2013 18:27:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5D1F1101E5 for ; Fri, 3 May 2013 18:27: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 RC8QILBnX2Bg for ; Fri, 3 May 2013 18:27:51 +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 329ED101E4 for ; Fri, 3 May 2013 18:27:41 +0200 (CEST) Original-Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r43GRer3013896 for ; Fri, 3 May 2013 18:27:40 +0200 Original-Received: by mail-lb0-f175.google.com with SMTP id w20so1685354lbh.6 for ; Fri, 03 May 2013 09:27:39 -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=qCXXHc6ASWjlYqCsCH5WTvKC0M79TGHgfM1AF68nFvE=; b=qQpj4q06Hg3rxfOzgOpUmMTIdopUIEOTLrE4p2h85qXAPQnzcpc+yZzs05VfeoVuGm 9/0Z11usC5WTYlw+GgdE6+59dH6b0iopJc5SSf0GKk0JI7lShj/wadGtdMnHsPkUP5nU KQfqEKhQDIe2zDld9Sm0s/fDBuDbf2P6gDWo9NrTjaIVGBE4BzfkMwHsbVbFornrkwBZ D6rjhSx+0GrV6TV8E4srZrs8fzNYwZM8uwBNLSIlxf/IukmHtT26FVNOSZuyPwIxgSVA fKEmjOhzyGYmPDc/mFdaSZ4kvQEjIayaM2oBIndvX4mSkrr+tIpPALJo9DwEKGlLYtvy Z0eQ== X-Received: by 10.152.88.2 with SMTP id bc2mr4481748lab.1.1367598459764; Fri, 03 May 2013 09:27:39 -0700 (PDT) Original-Received: by 10.114.187.69 with HTTP; Fri, 3 May 2013 09:27:39 -0700 (PDT) In-Reply-To: <5183D5B6.8040204@mmnetz.de> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.217.175; 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: 0VJvsrEKX - 7857e74a8f8d - 20130503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:82305 Archived-At: --===============1129077553== Content-Type: multipart/alternative; boundary=001a11c3670063c78604dbd2d4b3 --001a11c3670063c78604dbd2d4b3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, May 3, 2013 at 5:20 PM, "H. =C3=96zoguz" wrot= e: > Thanks luigi, but it does not work for my characters, see here: > > \definefont[tradoa][name:**trado*arabic at 20pt] % or > file:amiri-regular.ttf*... file:alq.ttf > > \directlua{ local function replace_txt (buffer) > buffer=3Dstring.gsub(buffer,"**=D8=A7=D9=84=D9=84=D9=87=D9=90","=D8=A7=D9= =84=D9=84=D9=91=D9=8E=D9=80=D9=87") return buffer end > callback.register("process_**input_buffer",replace_txt) > } > \starttext > my text {\setupalign[r2l] \tradoa =D8=A7=D9=84=D9=84=D9=91=D9=8E=D9=80=D9= =87} > \stoptext > > "trado" ist just the font "traditional arabic", nearly every system have > it, so you should be able to compile this. It does not replace the > character. > > ok, I've installed amiri-regular.ttf and it compiles, and as you say the gsub doesn't work. I'm trying to see why. --=20 luigi --001a11c3670063c78604dbd2d4b3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Fri, May 3, 2013 at 5:20 PM, "H. =C3=96zoguz" <h.oe= zoguz@mmnetz.de> wrote:
Thanks luigi, but it does= not work for my characters, see here:

\definefont[tradoa][name:trado*arabic at 20pt] % or file:amiri-regul= ar.ttf*... file:alq.ttf

\directlua{ local function replace_txt (buffer)
buffer=3Dstring.gsub(buffer,"=D8=A7=D9=84=D9=84=D9=87=D9=90&quo= t;,"=D8=A7=D9=84=D9=84=D9=91=D9=8E=D9=80=D9=87") return buffer en= d
callback.register("process_input_buffer",replace_txt)
}
\starttext
my text {\setupalign[r2l] \tradoa =D8=A7=D9=84=D9=84=D9=91=D9=8E=D9=80=D9= =87}
\stoptext

"trado" ist just the font "traditional arabic", nearly = every system have it, so you should be able to compile this. It does not re= place the character.


ok, I've installed=C2=A0 amiri-regular= .ttf and it compiles, and as you say the gsub doesn't work. I'm try= ing to see why.


--
luigi
--001a11c3670063c78604dbd2d4b3-- --===============1129077553== 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 ___________________________________________________________________________________ --===============1129077553==--