From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84214 Path: news.gmane.org!not-for-mail From: Vafa Khalighi Newsgroups: gmane.comp.tex.context Subject: Re: wrong behaviour with ConTeXt unicode bidi Date: Wed, 11 Sep 2013 02:20:43 +1000 Message-ID: References: <522F3A33.6070809@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2069921883==" X-Trace: ger.gmane.org 1378830056 18718 80.91.229.3 (10 Sep 2013 16:20:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 16:20:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 10 18:21:00 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 1VJQgV-0007HW-1f for gctc-ntg-context-518@m.gmane.org; Tue, 10 Sep 2013 18:20:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83F5A101FA; Tue, 10 Sep 2013 18:19:16 +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 U65C0FnkazmU; Tue, 10 Sep 2013 18:19:10 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 6DA2F101EB; Tue, 10 Sep 2013 18:19:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 44EE7101EB for ; Tue, 10 Sep 2013 18:19:09 +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 tmSb-rvgV6nt for ; Tue, 10 Sep 2013 18:19:03 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id C78CC101E5 for ; Tue, 10 Sep 2013 18:19:03 +0200 (CEST) Original-Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r8AGKi0O000847 for ; Tue, 10 Sep 2013 18:20:44 +0200 Original-Received: by mail-qc0-f175.google.com with SMTP id v2so4363771qcr.20 for ; Tue, 10 Sep 2013 09:20:43 -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=o1BePbumoPCul5S6/3Rx8OMc13q2wvcEm24pVS/tBno=; b=HZwN6Xwc+QZv9XevJ9/om6ri/u/sylAPar5epIgTaugg/kQRT3h5B36HXdONVULgKx MqXYFZIA86YfxlZDc/UeOb6lFHXYY567HqM0+JsJAdNXM36/Ep/Ufl2ivzaCM+eLSetf u044hWNUpKxl7yC4TdaBdtyVHc7dMdWQjedLm22aRVNbsm6oRbREKbwjbuXlGF+MmCio DtJuttDK3PS2biqe7HYBFkLwwgXUEYHwYib6VnDPvTfFoDPGYePDu/Frqn5Am0LK2Uoi FOSXeidZDVsNFY6gWGb1OCaPYGL5oKWyr+FGKagPy34EBdaUVEXy3AHVNnyI4egHtGDz WLJg== X-Received: by 10.49.84.6 with SMTP id u6mr20476234qey.79.1378830043602; Tue, 10 Sep 2013 09:20:43 -0700 (PDT) Original-Received: by 10.49.98.102 with HTTP; Tue, 10 Sep 2013 09:20:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: zlhEZhjooSxib26-JFFERG3H-7A X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:400d:c01::22f; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06KnskIum - 44780002882a - 20130910 (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:84214 Archived-At: --===============2069921883== Content-Type: multipart/alternative; boundary=047d7bdc0934f4837e04e609e20b --047d7bdc0934f4837e04e609e20b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry that is not fixed. If you type two of these, the second one will be broken. \starttext \setupalign[r2l] \definefont[arabicfont][Arial*arabic at 20pt] \setupdirections[bidi=3Dglobal,method=3Ddefault] \arabicfont =D8=A7=DB=8C=D9=86 (=D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D9=88 =DB=8C=DA=A9 (=D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1984) =D8=AE=D9=88=D8=A8 =D8=A7=D8=B3=D8=AA =D9=88 =D8=A8=D8=A7=D9=82=DB=8C =D9=85=D8=A7=D8=AC=D8= =B1=D8=A7. \stoptext Vafa Khalighi On Wed, Sep 11, 2013 at 1:45 AM, Vafa Khalighi wrote: > Thanks. That is now fixed. > > > On Wed, Sep 11, 2013 at 1:26 AM, Hans Hagen wrote: > >> On 9/10/2013 2:57 PM, Vafa Khalighi wrote: >> >>> Hi >>> >>> The following document shows the wrong behaviour (the second parenthese= s >>> is mirrored incorrectly and it should be after the number not before th= e >>> number). >>> >>> Assuming "test" is an RTL word when I write (test 1363) I expect to get >>> exactly that but somehow I get (test (1363 >>> >> >> new beta ... also with fix for issue khaled mentioned >> >> \starttext >> >> \setupalign[r2l] >> >> \definefont[arabicfont][Arial***arabic at 20pt] >> >> \enabletrackers[typesetters.**directions.one] >> \enabletrackers[typesetters.**directions.two] >> >> \setupdirections[bidi=3Dglobal,**method=3Ddefault] \arabicfont =D8=A7=DB= =8C=D9=86 (=DB=8C=DA=A9 >> =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D8=A7=D8=B3=D8=AA. \par >> \setupdirections[bidi=3Dglobal,**method=3Done] \arabicfont =D8=A7=DB= =8C=D9=86 (=DB=8C=DA=A9 >> =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D8=A7=D8=B3=D8=AA. \par >> \setupdirections[bidi=3Dglobal,**method=3Dtwo] \arabicfont =D8=A7=DB= =8C=D9=86 (=DB=8C=DA=A9 >> =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D8=A7=D8=B3=D8=AA. \par >> >> \stoptext >> >> >> One related question: is it possible to change font automatically when >>> luatex sees a LTR word? >>> >> >> no, but you can define start\stop commands that deal with such switches >> >> also, you can combine fonts (and there a yet not documented auto >> script/language switcher .. i have no time now to explain that one) >> >> btw, never use \textdir and \pardir directly (i might even define them a= s >> no-ops some day) but use the higher level alignment commands >> >> 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 t= o >> 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 >> ______________________________**______________________________** >> _______________________ > > > --047d7bdc0934f4837e04e609e20b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry that is not fixed. If you type two of these, the sec= ond one will be broken.

\starttext

\setupalign[r2l]

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



\setupdirections[bidi=3Dg= lobal,method=3Ddefault] \arabicfont=C2=A0

=D8=A7= =DB=8C=D9=86 (=D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D9=88
= =DB=8C=DA=A9 (=D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1984) =D8=AE=D9=88=D8=A8=
=C2=A0=D8=A7=D8=B3=D8=AA =C2=A0=D9=88 =D8=A8=D8=A7=D9=82=DB=8C = =D9=85=D8=A7=D8=AC=D8=B1=D8=A7.


\stoptext


=
Vafa Khalighi


On Wed, Sep 11, 2013 at 1:45 AM, Vafa Khalighi <p= ersian-tex@tug.org> wrote:
Thanks. That is now fixed.<= /div>

On Wed, Sep 11, 2013 at 1:26 AM, Hans Hagen <pragma@wxs.nl> wr= ote:
On 9/10/2013 2:57 PM, Vafa Khalighi wro= te:
Hi

The following document shows the wrong behaviour (the second parentheses is mirrored incorrectly and it should be after the number not before the number).

Assuming "test" is an RTL word when I write (test 1363) I expect = to get
exactly that but somehow I get (test (1363

new beta ... also with fix for issue khaled mentioned

\starttext

\setupalign[r2l]

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

\enabletrackers[typesetters.directions.one]
\enabletrackers[typesetters.directions.two]

\setupdirections[bidi=3Dglobal,method=3Ddefault] \arabicfont =D8=A7= =DB=8C=D9=86 (=DB=8C=DA=A9 =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 1363) =D8= =A7=D8=B3=D8=AA. \par
\setupdirections[bidi=3Dglobal,method=3Done] =C2=A0 =C2=A0 \arabicfo= nt =D8=A7=DB=8C=D9=86 (=DB=8C=DA=A9 =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 13= 63) =D8=A7=D8=B3=D8=AA. \par
\setupdirections[bidi=3Dglobal,method=3Dtwo] =C2=A0 =C2=A0 \arabicfo= nt =D8=A7=DB=8C=D9=86 (=DB=8C=DA=A9 =D8=A2=D8=B2=D9=85=D8=A7=DB=8C=D8=B4 13= 63) =D8=A7=D8=B3=D8=AA. \par

\stoptext


One related question: is it possible to change font automatically when
luatex sees a LTR word?

no, but you can define start\stop commands that deal with such switches

also, you can combine fonts (and there a yet not documented auto script/lan= guage switcher .. i have no time now to explain that one)

btw, never use \textdir and \pardir directly (i might even define them as n= o-ops some day) but use the higher level alignment commands

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
_____________________________________________________________= ______________________


--047d7bdc0934f4837e04e609e20b-- --===============2069921883== 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 ___________________________________________________________________________________ --===============2069921883==--