ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vafa Khalighi <persian-tex@tug.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: wrong behaviour with ConTeXt unicode bidi
Date: Wed, 11 Sep 2013 19:47:00 +1000	[thread overview]
Message-ID: <CAJZ8fypf+nsyfgw78VNqMXbqKK8P37S=voo80Cp173AYBjiwWQ@mail.gmail.com> (raw)
In-Reply-To: <CAJZ8fyqVV14wtG5N8PWSRsSORS1XXJojZGsPSgOwfeAxYrDHmg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3730 bytes --]

I tried the latest beta; it fixes the problem I mentioned but breaks
something else:

\starttext

\setupalign[r2l]

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



\setupdirections[bidi=global,method=default]
\hbox dir TRT{\arabicfont  (1984)}


\stoptext

If you have \hbox dir TLT, you get expected result. I am not sure if this
is the side effect of using \hbox dir TRT.



On Wed, Sep 11, 2013 at 2:20 AM, Vafa Khalighi <persian-tex@tug.org> wrote:

> 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=global,method=default] \arabicfont
>
> این (آزمایش 1363) و
> یک (آزمایش 1984) خوب
>  است  و باقی ماجرا.
>
>
> \stoptext
>
>
> Vafa Khalighi
>
>
> On Wed, Sep 11, 2013 at 1:45 AM, Vafa Khalighi <persian-tex@tug.org>wrote:
>
>> Thanks. That is now fixed.
>>
>>
>> On Wed, Sep 11, 2013 at 1:26 AM, Hans Hagen <pragma@wxs.nl> wrote:
>>
>>> On 9/10/2013 2:57 PM, Vafa Khalighi wrote:
>>>
>>>> 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=global,**method=default] \arabicfont این (یک
>>> آزمایش 1363) است. \par
>>> \setupdirections[bidi=global,**method=one]     \arabicfont این (یک
>>> آزمایش 1363) است. \par
>>> \setupdirections[bidi=global,**method=two]     \arabicfont این (یک
>>> آزمایش 1363) است. \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
>>> as 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
>>> to the Wiki!
>>>
>>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/**
>>> listinfo/ntg-context <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/<http://foundry.supelec.fr/projects/contextrev/>
>>> wiki     : http://contextgarden.net
>>> ______________________________**______________________________**
>>> _______________________
>>
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 5883 bytes --]

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 16769 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2013-09-11  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 12:57 Vafa Khalighi
2013-09-10 15:26 ` Hans Hagen
2013-09-10 15:45   ` Vafa Khalighi
2013-09-10 16:20     ` Vafa Khalighi
2013-09-11  9:47       ` Vafa Khalighi [this message]
2013-09-11 11:34         ` Vafa Khalighi
2013-09-11 12:37           ` Hans Hagen
2013-09-11 15:24             ` Khaled Hosny
2013-09-11 17:10               ` Hans Hagen
2013-09-12 14:19                 ` Vafa Khalighi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJZ8fypf+nsyfgw78VNqMXbqKK8P37S=voo80Cp173AYBjiwWQ@mail.gmail.com' \
    --to=persian-tex@tug.org \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).