From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94412 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: RTL section heads Date: Tue, 12 Apr 2016 22:59:15 -0400 Message-ID: References: <570BB8C3.5070207@wxs.nl> <43058997-6878-416D-93FF-E8153B0FD71D@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8752960163604719649==" X-Trace: ger.gmane.org 1460516402 26753 80.91.229.3 (13 Apr 2016 03:00:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2016 03:00:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 13 04:59:50 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqB1w-0003HD-Rv for gctc-ntg-context-518@m.gmane.org; Wed, 13 Apr 2016 04:59:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C4032A507; Wed, 13 Apr 2016 04:59:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RdAqT6T6WlsT; Wed, 13 Apr 2016 04:59:29 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id C02E7A508; Wed, 13 Apr 2016 04:59:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F1EAFA508 for ; Wed, 13 Apr 2016 04:59:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ceVX4_kb2R7H for ; Wed, 13 Apr 2016 04:59:27 +0200 (CEST) Original-Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7D4F6A507 for ; Wed, 13 Apr 2016 04:59:17 +0200 (CEST) Original-Received: by mail-oi0-f47.google.com with SMTP id p188so47202212oih.2 for ; Tue, 12 Apr 2016 19:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=wD56DozQIpJQEMA8Jymkls+wKRcuwZE6uooPyVxM+iM=; b=d2MAmSr4i4XMNNz1odW8xzeMS4FCSj/9ZoHt2sbkUd+PP5d5YXG1CMTqmtRHS8MXSt 0iB5hnIOMLKMeX63nOUJjqZb/kdfLj+9L4oXHab69uhIxGZdo4PMgERSKKEumEbnZUcB owNP3zgQ12KqQTKcTnlJbLwsOxJ7+JHLSWhuj8xhR1Lse3E73L1nPpKrcdqRInoH8YA5 NtbVxCbeGW/TSyQ8mDrF3b3rNZxkZ2REu23ojO/LMaMyTiyLLFatjBXf98wZ79tSnf3e kYDHIO3XXK1veTkgshzFN8e1iNPlhjjtPppiC22UyK0P+yFPr34tSkFqKfN9xolPmg9G 6NKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=wD56DozQIpJQEMA8Jymkls+wKRcuwZE6uooPyVxM+iM=; b=RcMSbCRWIxoARV8UkRE213RP16kyDC98DlY/KJX+qNqzUlK5xRr3KUoVbuPvay6kyf RauxeFFS14B8PAky/myevKPiQo+S53K/7KaIRz0domQ1HUkE97dvRteYn7rk1jwLYVdD ee1wwibXsANMMVKt698TY2GS/r3HVkIcHldvy9F7VFznNHPLj9abawBsG7tNvGTcZavE VasdRLyI+jBzSIqCTih5TDIuznMlgP7NP3PbOqH2737fwyzLI0TPzgMGJLldhz30l/PT J0z7dq4W6F8wqSeL+9SocKL+rVy10NiWv0pT+t/t989EV9L2KXcepOAzVO8pkMmTX9vA pG9w== X-Gm-Message-State: AOPr4FUfjpnwsRQ7NZsq1PDbqhhp9iotoO+BE48swPSGxpoz1K53uX9fXtQZsYK2bDQXl+NsmH9Q5kSPnoY8sQ== X-Received: by 10.202.84.1 with SMTP id i1mr3069609oib.130.1460516355674; Tue, 12 Apr 2016 19:59:15 -0700 (PDT) Original-Received: by 10.202.188.134 with HTTP; Tue, 12 Apr 2016 19:59:15 -0700 (PDT) In-Reply-To: <43058997-6878-416D-93FF-E8153B0FD71D@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:94412 Archived-At: --===============8752960163604719649== Content-Type: multipart/alternative; boundary=001a113de35891a02e053054f60e --001a113de35891a02e053054f60e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable As far as I remember, it was working fine with betas in December 2015 and January 2016. On Tue, Apr 12, 2016 at 10:15 PM, Otared Kavian wrote: > Hi Hans and Mohammad Reza, > > I can confirm that the wrong behaviour of numbers and digits in Right to > Left (more specifically Persian) is recent: indeed with > > ConTeXt ver: 2015.05.18 12:26 MKIV current fmt: 2015.6.18 int: > english/english > > from TeXLive 2015 the numbers and digits are rendered as they should. Is > it related to some changes in LuaTeX? > > Best regards: OK > > > On 13 Apr 2016, at 02:46, Mohammad Hossein Bateni > wrote: > > > > Unfortunately when I use method=3Dtwo for bidi, the numbers in the main > body are written from right to left. I'm starting to wonder whether it > does anything nontrivial at all. > > > > \usemodule[simplefonts] > > \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic] > > > > \setupdirections[bidi=3Dglobal,method=3Dtwo] > > \setupalign[r2l] > > > > \starttext > > > > =D8=B3=D8=A7=D9=84 =DB=B2=DB=B0=DB=B1=DB=B6 > > > > 2016 > > > > \stoptext > > > > > > I'm pretty sure this used to work (for example in version 2016.01.18 22= :21). > A similar piece of code is working fine on the website. I'm using CONTEX= T > version: 2016.04.01 13:01. I also verified that it is not working in > version: 2016.04.10 23:52. > > > > On Mon, Apr 11, 2016 at 11:47 AM, Mohammad Hossein Bateni < > bateni@gmail.com> wrote: > > Thanks, Hans! This does solve the problem with the list of numbers. > And actually if I add a numberstyle field, I can the section heads the wa= y > I like. Here is the setup that worked. (I will update Wiki later.) > > > > \setupdirections[bidi=3Dglobal,method=3Dtwo] > > \setupalign[r2l] > > > > \def\LTR#1{{\lefttoright#1}} > > \def\leftpersiandecimals#1{\LTR{\persiandecimals{#1}}} > > \defineconversion[leftpersiandecimals][\leftpersiandecimals] > > \setuphead[chapter,title,section,subject] > [conversion=3Dleftpersiandecimals,numberstyle=3D\righttoleft] > > > > \defineseparatorset[dashsep][-,-,-,-] > > \setuphead[section][sectionseparatorset=3Ddashsep] > > > > On Mon, Apr 11, 2016 at 10:46 AM, Hans Hagen wrote: > > On 4/11/2016 4:25 AM, Mohammad Hossein Bateni wrote: > > Hans & Wolfgang, > > > > Do you have suggestions here? How can I get the behavior I want for th= e > > section head numbers? > > > > In fact, the following may be quite relevant. > > > > \usemodule[simplefonts] > > \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic] > > > > \setupdirections[bidi=3Dglobal,method=3Ddefault] > > \setupalign[r2l] > > > > \starttext > > > > =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF =DB=B1=D8=8C =DB=B2=D8=8C =DB=B3 =D9=88 = =DB=B4 =D8=B1=D8=A7 =D8=AF=D8=B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8= =B1=DB=8C=D8=AF. > > > > =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF 1=D8=8C 2=D8=8C 3 =D9=88 4 =D8=B1=D8=A7 = =D8=AF=D8=B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8=B1=DB=8C=D8=AF. > > > > =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF 1, 2, 3 =D9=88 4 =D8=B1=D8=A7 =D8=AF=D8= =B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8=B1=DB=8C=D8=AF. > > > > \stoptext > > > > > > I expect the numbers 1, 2, 3 and 4 to appear in the same order from > > right to left. However, the visual order that I observe (regardless of > > whether I use Persian digits or English digits, or whether I use Persia= n > > or English commas) is 4, 1, 2, 3 (from left to right). Is this a bug i= n > > the bidi code? If so, are there any workarounds? > > > > method=3Dtwo > > > > Thanks, > > Hossein > > > > On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni > > > wrote: > > > > Hi, > > > > This is concerning an RTL text. I have one chapter and 10 sections > > under that. My goal is to achieve the following. > > 1) The number 10 should appear correctly with '1' visually to the > > left of '0'. > > 2) The chapter number should visually appear to the right of the > > section number. > > 3) Chapter and section numbers should be separated with a dash. > > (This is ignored in this email and I will follow up about it in > > another thread. To get a minimal working example, I also do not tr= y > > to change the numbers to use Persian digits.) > > > > In particular, the headings will be visually something like the > > following (aligned to the right). > > elpmas 1 > > txet 1-1 > > txet 2-1 > > txet 3-1 > > ... > > txet 10-1 > > > > Here's the first attempt. > > > > %% Attempt 1 > > \setupalign[r2l] > > > > \starttext > > \placecontent > > > > \chapter{sample} > > \dorecurse{10}{\section{text}} > > \stoptext > > > > The result is: > > elpmas 1 > > txet 1-1 > > ... > > txet 01-1 > > > > > > Then I add "\setupdirections[bidi=3Dglobal,method=3Ddefault]" to th= e > > beginning and I get the most strange result (number right-aligned > > but texts left-aligned): > > sample 1 > > text 1.1 > > ... > > text 1.10 > > > > > > A third attempt gives almost what I want (without period as the > > separator). > > > > %% Attempt 3 > > \setupalign[r2l] > > > > \def\LTR#1{{\lefttoright#1}} > > \def\leftnumbers#1{\LTR{\numbers{#1}}} > > \defineconversion[leftnumbers][\leftnumbers] > > \setuphead[chapter,title,section,subject] [conversion=3Dleftnumbers= ] > > > > \starttext > > \placecontent > > > > \chapter{sample} > > \dorecurse{10}{\section{text}} > > \stoptext > > > > > > The big problem is that in my RTL documents, I always have the > > setupdirections command, which messes things up here. (This makes > > it difficult to one section name with English title, which should > > still be typeset on the right-hand side of the page.) Note that in > > attempt 2 above, there were two issues: > > (1) Text and numbers appeared on the two far ends of the screen > > instead of being close to each other. This does not happen when I > > use Farsi text. > > (2) Chapter number appears to the left of section number. > > > > > > %% Attempt 5 > > \usemodule[simplefonts] > > \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic] > > > > \setupdirections[bidi=3Dglobal,method=3Ddefault] > > \setupalign[r2l] > > > > \starttext > > \placecontent > > > > \chapter{=D9=86=D9=85=D9=88=D9=86=D9=87} > > \dorecurse{10}{\section{=D9=85=D8=AA=D9=86}} > > \stoptext > > > > > > Interestingly the table of contents looks fine if I put the number > > inside an LTR macro; still in the main body, the section heads are > > typeset incorrectly. > > > > %% Attempt 6 > > \usemodule[simplefonts] > > \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic] > > > > \setupdirections[bidi=3Dglobal,method=3Ddefault] > > \setupalign[r2l] > > > > \def\LTR#1{{\lefttoright#1}} > > \def\leftnumbers#1{\LTR{\numbers{#1}}} > > \defineconversion[leftnumbers][\leftnumbers] > > \setuphead[chapter,title,section,subject] [conversion=3Dleftnumbers= ] > > > > \starttext > > \placecontent > > > > \chapter{=D9=86=D9=85=D9=88=D9=86=D9=87} > > \dorecurse{10}{\section{=D9=85=D8=AA=D9=86}} > > \stoptext > > > > > > I guess the solution is to get the entire section head number strin= g > > (e.g., 1.10) to have RTL direction, however, each individual number > > string inside (say, 1 or 10) should be written LTR. How can this b= e > > achieved? > > > > The six TeX files (with corresponding PDF outputs) are attached. > > > > BTW this is using ConTeXt ver: 2016.04.01 13:01 MKIV beta fmt: > > 2016.4.7 int: english/english, running LuaTeX, Version beta-0.90.0 > > (TeX Live 2016) on Mac OS X. > > > > Thanks a lot, > > =E2=80=94MHB > > > > > > > > > > -- > > > > ----------------------------------------------------------------- > > Hans Hagen | PRAGMA ADE > > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > > tel: 038 477 53 69 | 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 > > > _________________________________________________________________________= __________ > > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ --001a113de35891a02e053054f60e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
As far as I remember, it was working fine with betas in De= cember 2015 and January 2016.

On Tue, Apr 12, 2016 at 10:15 PM, Otared Kavian <otared@g= mail.com> wrote:
Hi Hans = and Mohammad Reza,

I can confirm that the wrong behaviour of numbers and digits in Right to Le= ft (more specifically Persian) is recent: indeed with

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ConTeXt=C2=A0 ver: 2015.05.18 12:26 MKIV current=C2=A0 fmt: 201= 5.6.18=C2=A0 int: english/english

from TeXLive 2015 the numbers and digits are rendered as they should. Is it= related to some changes in LuaTeX?

Best regards: OK

> On 13 Apr 2016, at 02:46, Mohammad Hossein Bateni <bateni@gmail.com> wrote:
>
> Unfortunately when I use method=3Dtwo for bidi, the numbers in the mai= n body are written from right to left.=C2=A0 I'm starting to wonder whe= ther it does anything nontrivial at all.
>
> \usemodule[simplefonts]
> \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic]
>
> \setupdirections[bidi=3Dglobal,method=3Dtwo]
> \setupalign[r2l]
>
> \starttext
>
> =D8=B3=D8=A7=D9=84 =DB=B2=DB=B0=DB=B1=DB=B6
>
> 2016
>
> \stoptext
>
>
> I'm pretty sure this used to work (for example in version 2016.01.18 22:21).=C2= =A0 A similar piece of code is working fine on the website.=C2=A0 I'm u= sing CONTEXT version: 2016.04.01 13:01.=C2=A0 I also verified that it is not working in ver= sion: 2016.04.10 23<= /a>:52.
>
> On Mon, Apr 11, 2016 at 11:47 AM, Mohammad Hossein Bateni <
bateni@gmail.com> wrote:
> Thanks, Hans!=C2=A0 This does solve the problem with the list of numbe= rs.=C2=A0 And actually if I add a numberstyle field, I can the section head= s the way I like.=C2=A0 Here is the setup that worked.=C2=A0 (I will update= Wiki later.)
>
> \setupdirections[bidi=3Dglobal,method=3Dtwo]
> \setupalign[r2l]
>
> \def\LTR#1{{\lefttoright#1}}
> \def\leftpersiandecimals#1{\LTR{\persiandecimals{#1}}}
> \defineconversion[leftpersiandecimals][\leftpersiandecimals]
> \setuphead[chapter,title,section,subject] [conversion=3Dleftpersiandec= imals,numberstyle=3D\righttoleft]
>
> \defineseparatorset[dashsep][-,-,-,-]
> \setuphead[section][sectionseparatorset=3Ddashsep]
>
> On Mon, Apr 11, 2016 at 10:46 AM, Hans Hagen <pragma@wxs.nl> wrote:
> On 4/11/2016 4:25 AM, Mohammad Hossein Bateni wrote:
> Hans & Wolfgang,
>
> Do you have suggestions here?=C2=A0 How can I get the behavior I want = for the
> section head numbers?
>
> In fact, the following may be quite relevant.
>
> \usemodule[simplefonts]
> \setmainfont[ALM Fixed][features=3Darabic,range=3Darabic]
>
> \setupdirections[bidi=3Dglobal,method=3Ddefault]
> \setupalign[r2l]
>
> \starttext
>
> =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF =DB=B1=D8=8C =DB=B2=D8=8C =DB=B3 =D9=88= =DB=B4 =D8=B1=D8=A7 =D8=AF=D8=B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8= =B1=DB=8C=D8=AF.
>
> =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF 1=D8=8C 2=D8=8C 3 =D9=88 4 =D8=B1=D8=A7= =D8=AF=D8=B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8=B1=DB=8C=D8=AF.
>
> =D8=A7=D8=B9=D8=AF=D8=A7=D8=AF 1, 2, 3 =D9=88 4 =D8=B1=D8=A7 =D8=AF=D8= =B1 =D9=86=D8=B8=D8=B1 =D8=A8=DA=AF=DB=8C=D8=B1=DB=8C=D8=AF.
>
> \stoptext
>
>
> I expect the numbers 1, 2, 3 and 4 to appear in the same order from > right to left.=C2=A0 However, the visual order that I observe (regardl= ess of
> whether I use Persian digits or English digits, or whether I use Persi= an
> or English commas) is 4, 1, 2, 3 (from left to right).=C2=A0 Is this a= bug in
> the bidi code?=C2=A0 If so, are there any workarounds?
>
> method=3Dtwo
>
> Thanks,
> Hossein
>
> On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni
> <bateni@gmail.com <mailt= o:bateni@gmail.com>> wrote: >
>=C2=A0 =C2=A0 =C2=A0Hi,
>
>=C2=A0 =C2=A0 =C2=A0This is concerning an RTL text.=C2=A0 I have one ch= apter and 10 sections
>=C2=A0 =C2=A0 =C2=A0under that.=C2=A0 My goal is to achieve the followi= ng.
>=C2=A0 =C2=A0 =C2=A01) The number 10 should appear correctly with '= 1' visually to the
>=C2=A0 =C2=A0 =C2=A0left of '0'.
>=C2=A0 =C2=A0 =C2=A02) The chapter number should visually appear to the= right of the
>=C2=A0 =C2=A0 =C2=A0section number.
>=C2=A0 =C2=A0 =C2=A03) Chapter and section numbers should be separated = with a dash.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(This is ignored in this email and I will fo= llow up about it in
>=C2=A0 =C2=A0 =C2=A0another thread.=C2=A0 To get a minimal working exam= ple, I also do not try
>=C2=A0 =C2=A0 =C2=A0to change the numbers to use Persian digits.)
>
>=C2=A0 =C2=A0 =C2=A0In particular, the headings will be visually someth= ing like the
>=C2=A0 =C2=A0 =C2=A0following (aligned to the right).
>=C2=A0 =C2=A0 =C2=A0elpmas 1
>=C2=A0 =C2=A0 =C2=A0txet 1-1
>=C2=A0 =C2=A0 =C2=A0txet 2-1
>=C2=A0 =C2=A0 =C2=A0txet 3-1
>=C2=A0 =C2=A0 =C2=A0...
>=C2=A0 =C2=A0 =C2=A0txet 10-1
>
>=C2=A0 =C2=A0 =C2=A0Here's the first attempt.
>
>=C2=A0 =C2=A0 =C2=A0%% Attempt 1
>=C2=A0 =C2=A0 =C2=A0\setupalign[r2l]
>
>=C2=A0 =C2=A0 =C2=A0\starttext
>=C2=A0 =C2=A0 =C2=A0\placecontent
>
>=C2=A0 =C2=A0 =C2=A0\chapter{sample}
>=C2=A0 =C2=A0 =C2=A0\dorecurse{10}{\section{text}}
>=C2=A0 =C2=A0 =C2=A0\stoptext
>
>=C2=A0 =C2=A0 =C2=A0The result is:
>=C2=A0 =C2=A0 =C2=A0elpmas 1
>=C2=A0 =C2=A0 =C2=A0txet 1-1
>=C2=A0 =C2=A0 =C2=A0...
>=C2=A0 =C2=A0 =C2=A0txet 01-1
>
>
>=C2=A0 =C2=A0 =C2=A0Then I add "\setupdirections[bidi=3Dglobal,met= hod=3Ddefault]" to the
>=C2=A0 =C2=A0 =C2=A0beginning and I get the most strange result (number= right-aligned
>=C2=A0 =C2=A0 =C2=A0but texts left-aligned):
>=C2=A0 =C2=A0 =C2=A0sample=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 1
>=C2=A0 =C2=A0 =C2=A0text=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=A01.1
>=C2=A0 =C2=A0 =C2=A0...
>=C2=A0 =C2=A0 =C2=A0text=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=A01.10
>
>
>=C2=A0 =C2=A0 =C2=A0A third attempt gives almost what I want (without p= eriod as the
>=C2=A0 =C2=A0 =C2=A0separator).
>
>=C2=A0 =C2=A0 =C2=A0%% Attempt 3
>=C2=A0 =C2=A0 =C2=A0\setupalign[r2l]
>
>=C2=A0 =C2=A0 =C2=A0\def\LTR#1{{\lefttoright#1}}
>=C2=A0 =C2=A0 =C2=A0\def\leftnumbers#1{\LTR{\numbers{#1}}}
>=C2=A0 =C2=A0 =C2=A0\defineconversion[leftnumbers][\leftnumbers]
>=C2=A0 =C2=A0 =C2=A0\setuphead[chapter,title,section,subject] [conversi= on=3Dleftnumbers]
>
>=C2=A0 =C2=A0 =C2=A0\starttext
>=C2=A0 =C2=A0 =C2=A0\placecontent
>
>=C2=A0 =C2=A0 =C2=A0\chapter{sample}
>=C2=A0 =C2=A0 =C2=A0\dorecurse{10}{\section{text}}
>=C2=A0 =C2=A0 =C2=A0\stoptext
>
>
>=C2=A0 =C2=A0 =C2=A0The big problem is that in my RTL documents, I alwa= ys have the
>=C2=A0 =C2=A0 =C2=A0setupdirections command, which messes things up her= e.=C2=A0 (This makes
>=C2=A0 =C2=A0 =C2=A0it difficult to one section name with English title= , which should
>=C2=A0 =C2=A0 =C2=A0still be typeset on the right-hand side of the page= .)=C2=A0 Note that in
>=C2=A0 =C2=A0 =C2=A0attempt 2 above, there were two issues:
>=C2=A0 =C2=A0 =C2=A0(1) Text and numbers appeared on the two far ends o= f the screen
>=C2=A0 =C2=A0 =C2=A0instead of being close to each other.=C2=A0 This do= es not happen when I
>=C2=A0 =C2=A0 =C2=A0use Farsi text.
>=C2=A0 =C2=A0 =C2=A0(2) Chapter number appears to the left of section n= umber.
>
>
>=C2=A0 =C2=A0 =C2=A0%% Attempt 5
>=C2=A0 =C2=A0 =C2=A0\usemodule[simplefonts]
>=C2=A0 =C2=A0 =C2=A0\setmainfont[ALM Fixed][features=3Darabic,range=3Da= rabic]
>
>=C2=A0 =C2=A0 =C2=A0\setupdirections[bidi=3Dglobal,method=3Ddefault] >=C2=A0 =C2=A0 =C2=A0\setupalign[r2l]
>
>=C2=A0 =C2=A0 =C2=A0\starttext
>=C2=A0 =C2=A0 =C2=A0\placecontent
>
>=C2=A0 =C2=A0 =C2=A0\chapter{=D9=86=D9=85=D9=88=D9=86=D9=87}
>=C2=A0 =C2=A0 =C2=A0\dorecurse{10}{\section{=D9=85=D8=AA=D9=86}}
>=C2=A0 =C2=A0 =C2=A0\stoptext
>
>
>=C2=A0 =C2=A0 =C2=A0Interestingly the table of contents looks fine if I= put the number
>=C2=A0 =C2=A0 =C2=A0inside an LTR macro; still in the main body, the se= ction heads are
>=C2=A0 =C2=A0 =C2=A0typeset incorrectly.
>
>=C2=A0 =C2=A0 =C2=A0%% Attempt 6
>=C2=A0 =C2=A0 =C2=A0\usemodule[simplefonts]
>=C2=A0 =C2=A0 =C2=A0\setmainfont[ALM Fixed][features=3Darabic,range=3Da= rabic]
>
>=C2=A0 =C2=A0 =C2=A0\setupdirections[bidi=3Dglobal,method=3Ddefault] >=C2=A0 =C2=A0 =C2=A0\setupalign[r2l]
>
>=C2=A0 =C2=A0 =C2=A0\def\LTR#1{{\lefttoright#1}}
>=C2=A0 =C2=A0 =C2=A0\def\leftnumbers#1{\LTR{\numbers{#1}}}
>=C2=A0 =C2=A0 =C2=A0\defineconversion[leftnumbers][\leftnumbers]
>=C2=A0 =C2=A0 =C2=A0\setuphead[chapter,title,section,subject] [conversi= on=3Dleftnumbers]
>
>=C2=A0 =C2=A0 =C2=A0\starttext
>=C2=A0 =C2=A0 =C2=A0\placecontent
>
>=C2=A0 =C2=A0 =C2=A0\chapter{=D9=86=D9=85=D9=88=D9=86=D9=87}
>=C2=A0 =C2=A0 =C2=A0\dorecurse{10}{\section{=D9=85=D8=AA=D9=86}}
>=C2=A0 =C2=A0 =C2=A0\stoptext
>
>
>=C2=A0 =C2=A0 =C2=A0I guess the solution is to get the entire section h= ead number string
>=C2=A0 =C2=A0 =C2=A0(e.g., 1.10) to have RTL direction, however, each i= ndividual number
>=C2=A0 =C2=A0 =C2=A0string inside (say, 1 or 10) should be written LTR.= =C2=A0 How can this be
>=C2=A0 =C2=A0 =C2=A0achieved?
>
>=C2=A0 =C2=A0 =C2=A0The six TeX files (with corresponding PDF outputs) = are attached.
>
>=C2=A0 =C2=A0 =C2=A0BTW this is using ConTeXt ver: 2016.04.01 13:01 MKI= V beta fmt:
>=C2=A0 =C2=A0 =C2=A02016.4.7 int: english/english, running LuaTeX, Vers= ion beta-0.90.0
>=C2=A0 =C2=A0 =C2=A0(TeX Live 2016) on Mac OS X.
>
>=C2=A0 =C2=A0 =C2=A0Thanks a lot,
>=C2=A0 =C2=A0 =C2=A0=E2=80=94MHB
>
>
>
>
> --
>
> -----------------------------------------------------------------
>=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=A0Hans Hagen | PRAGMA ADE
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 = | 8061 GH Hasselt | The Netherlands
>=C2=A0 =C2=A0 =C2=A0 =C2=A0tel: 038 477 53 69 | 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=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net > archive=C2=A0 : http://foundry.supelec.fr/project= s/contextrev/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">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/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--001a113de35891a02e053054f60e-- --===============8752960163604719649== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============8752960163604719649==--