From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84235 Path: news.gmane.org!not-for-mail From: Vafa Khalighi Newsgroups: gmane.comp.tex.context Subject: Re: wrong behaviour with ConTeXt unicode bidi Date: Fri, 13 Sep 2013 00:19:26 +1000 Message-ID: References: <522F3A33.6070809@wxs.nl> <5230640F.9060203@wxs.nl> <20130911152431.GB26429@khaled-laptop> <5230A3FF.60305@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1726730337==" X-Trace: ger.gmane.org 1378995572 25355 80.91.229.3 (12 Sep 2013 14:19:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2013 14:19:32 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 12 16:19:36 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VK7k8-0000P2-Jh for gctc-ntg-context-518@m.gmane.org; Thu, 12 Sep 2013 16:19:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A699101F7; Thu, 12 Sep 2013 16:17:50 +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 Jz7Q58jvj8HH; Thu, 12 Sep 2013 16:17:47 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F0A33101EB; Thu, 12 Sep 2013 16:17:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 30D31101EB for ; Thu, 12 Sep 2013 16:17:45 +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 bE2NgcMKidRq for ; Thu, 12 Sep 2013 16:17:43 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 51F87101EA for ; Thu, 12 Sep 2013 16:17:43 +0200 (CEST) Original-Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r8CEL7xX032762 for ; Thu, 12 Sep 2013 16:21:07 +0200 Original-Received: by mail-qc0-f176.google.com with SMTP id t7so3717440qcv.35 for ; Thu, 12 Sep 2013 07:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=pDAASFBf47J2lyw9jyP5uItgLPrH7RtHARIU9qmGtA0=; b=vE2yMkrQ/cFGnsydsPZJnrMDbDjoyEDEB0acFHdtX6AcF0XJM2keepeiN+SURnwVdT PDs7C9TAt0LVSb6UFMERKC3ufOhE2CDO9yhpw8dQiLlv7vmD5FPWlJqsP5Tfz6afS4aO z58vu+Y0W4oqts/AueduqgBlNenKCsHMN40pgV4jVjds6+l9xapN389U+Qyh/PK28PIS JY5h/T2PYSYPOaji6XBceYEAMzwm9QAyucyr2uJNSQ5oA3FGnxMsQoFSOA5W9clYqDqo uY3QqgOXLIWXxlvPsiZ11w9HDjLmavjt0JnxnqWEgIbNMzMgql436vKN9h/FfVSk+UpV nxxg== X-Received: by 10.49.95.234 with SMTP id dn10mr14171916qeb.54.1378995566656; Thu, 12 Sep 2013 07:19:26 -0700 (PDT) Original-Received: by 10.49.98.102 with HTTP; Thu, 12 Sep 2013 07:19:26 -0700 (PDT) In-Reply-To: <5230A3FF.60305@wxs.nl> X-Google-Sender-Auth: 5FI3kxHw8WSAj2ELbpBymFxC_JY X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:400d:c01::230; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01Koel7iz - ae0be5ca7eaf - 20130912 (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:84235 Archived-At: --===============1726730337== Content-Type: multipart/alternative; boundary=047d7b676bc2e5e5c004e6306c8f --047d7b676bc2e5e5c004e6306c8f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable There is one more problem with the default method: \starttext \setupalign[r2l] \definefont[arabicfont][Arial*arabic at 20pt] \setupdirections[bidi=3Dglobal,method=3Ddefault] 1. \stoptext from right to left perspective it prints "1." (dot after digit 1) as ".1" (dot before digit 1) however method one and two work correctly. On Thu, Sep 12, 2013 at 3:10 AM, Hans Hagen wrote: > On 9/11/2013 5:24 PM, Khaled Hosny wrote: > >> On Wed, Sep 11, 2013 at 02:37:35PM +0200, Hans Hagen wrote: >> >>> anyway, it would be nice to see where the three methods fail: >>> >> >> Of the three, method one seems to give correct results on all the given >> tests (I=E2=80=99m yet to test with my own documents). >> >> I=E2=80=99m skeptical that bidi can be implemented in a one pass algorit= hm, >> there have been a one pass algorithm called =E2=80=9CPretty Good Bidi >> Algorithm=E2=80=9D, but it has its limitation (I never tested it myself)= . >> > > Sure, although it can be close to okay with some backward and forward > scanning but I'm nbot really in the mood for that now. Anyhow, for the > occasional mix of arabic and latin this method works ok. For more extreme > cases method 'one' will do and method 'two' ... well it depends on > developments in unicode as this method will be the more configurable one. > (And I can probably make a faster implementation of method two when > performance matters.) > > > Hans > > > ------------------------------**------------------------------**----- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > ------------------------------**------------------------------**----- > ______________________________**______________________________** > _______________________ > 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 > ______________________________**______________________________** > _______________________ > --047d7b676bc2e5e5c004e6306c8f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There is one more problem with the default method:
\starttext

\setupalign[r2l]

\definefont[arabicfont][Arial*arabic at 20pt]



\setupdirections[bidi=3Dglobal,method= =3Ddefault]=C2=A0


1.


\stopt= ext
<= br>

from right to le= ft perspective it prints "1." (dot after digit 1) as ".1&quo= t; (dot before digit 1) however method one and two work correctly.=C2=A0


On Thu,= Sep 12, 2013 at 3:10 AM, Hans Hagen <pragma@wxs.nl> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
On 9/11/2013 5:24 PM, Khaled Hosny wrote:
On Wed, Sep 11, 2013 at 02:37:35PM +0200, Hans Hagen wrote:
anyway, it would be nice to see where the three methods fail:

Of the three, method one seems to give correct results on all the given
tests (I=E2=80=99m yet to test with my own documents).

I=E2=80=99m skeptical that bidi can be implemented in a one pass algorithm,=
there have been a one pass algorithm called =E2=80=9CPretty Good Bidi
Algorithm=E2=80=9D, but it has its limitation (I never tested it myself).

Sure, although it can be close to okay with some backward and forward scann= ing but I'm nbot really in the mood for that now. Anyhow, for the occas= ional mix of arabic and latin this method works ok. For more extreme cases = method 'one' will do and method 'two' ... well it depends o= n developments in unicode as this method will be the more configurable one.= (And I can probably make a faster implementation of method two when perfor= mance matters.)


Hans


-------------------------------------------------------------= ----
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 H= ans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Ridderstraat 27 | 8061 GH = Hasselt | The Netherlands
=C2=A0 =C2=A0 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0| www.p= ragma-pod.nl
-------------------------------------------------------------= ----
_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =C2=A0:
http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive =C2=A0: http://foundry.supelec.fr/projects/contextrev/=
wiki =C2=A0 =C2=A0 : http://contextgarden.net
_____________________________________________________________= ______________________

--047d7b676bc2e5e5c004e6306c8f-- --===============1726730337== 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 ___________________________________________________________________________________ --===============1726730337==--