From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108836 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: Arabic support Date: Wed, 23 Sep 2020 22:02:53 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1853497272294210012==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20598"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 24 04:03:45 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLGbp-0005Ek-9r for gctc-ntg-context-518@m.gmane-mx.org; Thu, 24 Sep 2020 04:03:45 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 77A59185B10; Thu, 24 Sep 2020 04:03:09 +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 No7zYY6aKry1; Thu, 24 Sep 2020 04:03:07 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7B8A0185E55; Thu, 24 Sep 2020 04:03:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E42C4185E55 for ; Thu, 24 Sep 2020 04:03:05 +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 JkC-AycPiaLy for ; Thu, 24 Sep 2020 04:03:04 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.68; helo=mail-wr1-f68.google.com; envelope-from=bateni@gmail.com; receiver= Original-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id E3026185E4F for ; Thu, 24 Sep 2020 04:03:04 +0200 (CEST) Original-Received: by mail-wr1-f68.google.com with SMTP id e16so2041600wrm.2 for ; Wed, 23 Sep 2020 19:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=D3+bI8CXnxT2F9fb3Mh/pU3jAlMIBvWCqb0j01jub90=; b=iNOLbXE9zZJilWsqOXR3AV8U9qWvbfj9XQd4hdHI6YrIyS4KAlJNVcR7E2D1QzWocv lC2tWqbAu9k4WwMpAwpnoAUHPwxdrsj+kt1r51HgwhDz0EthZgRZJPTGFTTQOteqiH3O C7jYwwLhTchg8mOgW316NBii+P0kzSVpO9xH1tdT4yvKLKT58ai5iumxwv3Wd/wxAYe5 9B5qJo6xVRhQ7JGIrERrIVvne30lzfHfbzIdiarc8Hib1z7tJUZgH0ocLaSo8Y4wZsZL 31DJQenBqn5D51TDGrCRNkym2Dg1pGf7Niz+GKgi0/RWJkIIrCKZIKttdAeda3cZLJyB CDFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=D3+bI8CXnxT2F9fb3Mh/pU3jAlMIBvWCqb0j01jub90=; b=HZcnwHk0nVTTu8eSY1Ur03t3T08gRmN/qsSbJ+RU9loPCMCCy1XpsmWPhu520eukNR PIv5uoJyjuViOUFVkNI9GOzwXwFZGmRXPh0c0UyepWdFSHKzQNN3YjQjuqUfSIA6P2RK nLhPsjIIftYdmbHtzPKMI6UHDeA2c6JsQOFZb+RD6p9mnoO6wvR716rTctLhDDTf5hx9 MjxLmcGESF7KFItKyO4Lzjb43yjXk6Kpm+03IAXdx0xDVEcwPYVr/5SphOxQE/QvtunR t07DIY7qdimDxW/6mH6/5FsyDXdSuH2kVipvwbO+10tOK+CDIXF2Ffkodnf+s4gK019C SPOg== X-Gm-Message-State: AOAM533SXQMGxS++eUFH5PBFKgj1Dp2iyQ/bGYvHBO0FEdoppUwfvu1R wNAtUng5GM6YLFxQPfTUjmvZi3qnZXQlNQK6D3xeyIJQh1c= X-Google-Smtp-Source: ABdhPJz2JukysMWZWt2q+VhEY5NnyRLmwY6tG1dkl93V14y3pI5aFzzFMI0flFS5N/th7gwxdApRfn+UZSVkA/uGvh4= X-Received: by 2002:adf:ffca:: with SMTP id x10mr2553881wrs.342.1600912984187; Wed, 23 Sep 2020 19:03:04 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:108836 Archived-At: --===============1853497272294210012== Content-Type: multipart/alternative; boundary="000000000000bd261105b0059950" --000000000000bd261105b0059950 Content-Type: text/plain; charset="UTF-8" Hi Denis, See this page [https://wiki.contextgarden.net/RTL] which may need some updating. I have some more definitions here [ https://github.com/bateni/dabeer/blob/master/texmf-local/tex/context/modules/dabeer/mkiv/p-dabeer.mkiv], though it's partly to handle differences between Persian and Arabic. Not all directions are reversed automatically. Beside footnotes, you might need to do it for tables, columns, pages, headers, footers, registers (index), etc. I don't recall if sorting was done properly for Arabic (needed for registers). Some trickery may be needed to get the RTL right when numbers are involved, say, for enumerations (theorems, lemma, etc.) and TOC numbering. These are not specific to Arabic, though, and should surface for Hebrew as well. Once in a while I run into problems with misoriented parentheses or quotation marks (specially https://en.wiktionary.org/wiki/%C2%AB_%C2%BB). This may be due to setupdirection algorithms or a side effect of how some Context commands work. One needs to document them, so a fix is uploaded. Depending on what you want to typeset, you may need to change the numerals (for page numbers, enumerations, figure and table numbers, etc.) as well as dates, etc. Some of these are already handled via the \mainlanguage[ar] command. Regards, MHB On Mon, Sep 21, 2020 at 2:46 AM Denis Maier wrote: > Hi > > Just wondering what the current support for Arabic is. Does anyone know? > My document works fine for Hebrew and I've just added a new fontfallbac: > \definefallbackfamily[mainface][rm][Scheherazade] [range=arabic, > force=yes, features=arabic] > > Bidi is activated with \setupdirections[bidi=global,method=unicode] > > Is that enough for Arabic? Or are there other things I need to take care > of? > > E.g. searching in the mailing-list archive I found this message: > https://www.mail-archive.com/ntg-context@ntg.nl/msg78573.html > > > > You have to set the bidi settings again for the footnotes because > > the notes mechanism resets many of these setups. > > > \startsetups[note:footnote] > > \setupdirections[bidi=global] > > \stopsetups > > > > \setupnote[footnote][setups=note:footnote] % align=righttoleft > > Is that still true? Anything else I need to be aware of? > > Best, > Denis > > ___________________________________________________________________________________ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > --000000000000bd261105b0059950 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Denis,

See this page [https://wiki.contextgarden.net/RTL] wh= ich may need some updating.=C2=A0 I have some more definitions here [https://github.com/bateni/dabeer/blob/mas= ter/texmf-local/tex/context/modules/dabeer/mkiv/p-dabeer.mkiv], though = it's partly to handle differences between Persian and Arabic.

Not all directions are reversed automatically. Beside footn= otes, you might need to do it for tables, columns, pages, headers, footers,= registers (index), etc. I don't recall if sorting was done properly fo= r Arabic (needed for registers). Some trickery may be needed to get the RTL= right when numbers are involved, say, for enumerations (theorems, lemma, e= tc.) and TOC numbering. These are not specific to Arabic, though, and shoul= d surface for Hebrew as well.

Once in a while I ru= n into problems with misoriented parentheses or quotation marks (specially = https://en.wiktion= ary.org/wiki/%C2%AB_%C2%BB). This may be due to setupdirection=C2=A0alg= orithms or a side effect of how some Context commands work. One needs to do= cument them, so a fix is uploaded.

Depending on wh= at you want to typeset, you may need to change the numerals (for page numbe= rs, enumerations, figure and table numbers, etc.) as well as dates, etc.=C2= =A0 Some of these are already handled via the \mainlanguage[ar] command.

Regards,
MHB

On Mon, Sep 21, 2020 at = 2:46 AM Denis Maier <de= nis.maier.lists@mailbox.org> wrote:
Hi

Just wondering what the current support for Arabic is. Does anyone know? My document works fine for Hebrew and I've just added a new fontfallbac= :
\definefallbackfamily[mainface][rm][Scheherazade] [range=3Darabic,
force=3Dyes, features=3Darabic]

Bidi is activated with \setupdirections[bidi=3Dglobal,method=3Dunicode]

Is that enough for Arabic? Or are there other things I need to take care of= ?

E.g. searching in the mailing-list archive I found this message:
https://www.mail-archive.com/ntg-contex= t@ntg.nl/msg78573.html


=C2=A0> You have to set the bidi settings again for the footnotes becaus= e
=C2=A0> the notes mechanism resets many of these setups.

=C2=A0> \startsetups[note:footnote]
=C2=A0> \setupdirections[bidi=3Dglobal]
=C2=A0> \stopsetups
=C2=A0>
=C2=A0> \setupnote[footnote][setups=3Dnote:footnote] % align=3Drighttole= ft

Is that still true? Anything else I need to be aware of?

Best,
Denis
___________________________________________________________________________= ________
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/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000bd261105b0059950-- --===============1853497272294210012== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1853497272294210012==--