From: Khaled Hosny <khaledhosny@eglug.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Luatex (actually Aleph) and Bidi_Mirrored chars in RTL mode
Date: Sat, 14 Jun 2008 00:52:27 +0300 [thread overview]
Message-ID: <20080613215227.GA13603@khaled-laptop> (raw)
In-Reply-To: <484D9BB9.1020601@wxs.nl>
[-- Attachment #1.1.1: Type: text/plain, Size: 2074 bytes --]
On Mon, Jun 09, 2008 at 11:08:09PM +0200, Hans Hagen wrote:
> Khaled Hosny wrote:
> > Luatex does not mirror characters that has a Bidi_Mirrored property when
> > the text direction is set to RTL (TRT in Aleph), according to
> > http://unicode.org/reports/tr9/#Mirroring, the different types of
> > parenthesis that has Bidi_Mirrored property should be mirreored in RTL
> > mode, but this isn't what I get. Is this a bug, feature, or am I missing
> > some thing?
>
> experimental in the beta
>
> \setcharactermirroring[1]
It does work perfectly with unidirectional texts (RTL or LTR), but when
mixing bi-directional text, like Arabic text between brackets inside
English line, the closing bracket takes the direction of the embedded
text not the main line.
See the attached example.
Regards,
Khaled
>
> no high level interface yet, i need to think of how to do such things as
> efficient as possible and prevent interference with font features and
> such (currently it's an attribute handler that pops in quite early)
>
>
> --
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
--
Khaled Hosny
Arabic localizer and member of Arabeyes.org team
[-- Attachment #1.1.2: mirroring.tex --]
[-- Type: text/x-tex, Size: 1340 bytes --]
% engine=luatex
% OpenType features needed for Arabic
\definefontfeature
[arab]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\font\Arab = arabtype*arab
\setcharactermirroring[1]
\hoffset=0pt
% For inner paragraph control within an LR paragraph
\definestartstop
[arabictext]
[commands=%
{\textdir TRT%
\Arab}]
\def\ArabicText#1{\startarabictext#1\stoparabictext}
% For separate Arabic-script paragraphs
\def\ArabicDirPar{\textdir TRT\pardir TRT}
\definestartstop
[arab]
[commands=%
{\Arab%
\ArabicDirPar}]
\showframe[text]
\starttext
\startarab
سلام (قوس) وقوس <قوس> و [قوس]
وهذا قوس حول نص غير عربي \textdir TLT (hello) \textdir TRT ثم عربي
\stoparab
\blank
Here is some mixed {\em Arabic-} (\ArabicText{عربي}) and
Latin-script. As you can see, Aleph does a very good job mixing
{\em LR} (\ArabicText{يسار-يمين}) and {\em RL}
(\ArabicText{يمين-يسار}) texts. \ArabicText{و
هنا جملة منقطعة في وسط قرينة
لاتينية}. Aleph even does a great job breaking Arabic
phrases across lines.
(bracket) and <bracket> and [bracket]
\stoptext
[-- Attachment #1.1.3: mirroring.pdf --]
[-- Type: application/pdf, Size: 19796 bytes --]
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-06-13 21:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-09 1:21 Khaled Hosny
2008-06-09 13:43 ` Arthur Reutenauer
2008-06-09 15:20 ` Hans Hagen
2008-06-09 17:01 ` Khaled Hosny
2008-06-09 21:08 ` Hans Hagen
2008-06-13 21:52 ` Khaled Hosny [this message]
2008-06-14 1:34 ` Idris Samawi Hamid
2008-06-15 17:26 ` Khaled Hosny
2008-06-15 20:32 ` Hans Hagen
2008-06-15 20:50 ` Idris Samawi Hamid
2008-06-15 20:58 ` Hans Hagen
2008-06-15 21:42 ` Idris Samawi Hamid
2008-06-16 16:14 ` Khaled Hosny
2008-06-15 20:37 ` Hans Hagen
2008-06-15 20:36 ` Hans Hagen
2008-06-10 1:07 ` Idris Samawi Hamid
2008-06-10 1:36 ` Arthur Reutenauer
2008-06-10 1:44 ` Idris Samawi Hamid
2008-06-10 7:34 ` Hans Hagen
2008-06-10 15:28 ` Arthur Reutenauer
2008-06-10 15:32 ` Hans Hagen
2008-06-10 21:30 ` Arthur Reutenauer
2008-06-18 5:40 ` Otared Kavian
2008-06-18 8:29 ` Arthur Reutenauer
2008-06-18 15:22 ` Idris Samawi Hamid
2008-06-18 15:44 ` Khaled Hosny
2008-06-18 19:50 ` Idris Samawi Hamid
2008-06-18 21:38 ` Khaled Hosny
2008-06-10 8:13 ` Hans Hagen
2008-06-10 15:29 ` Arthur Reutenauer
2008-06-10 16:24 ` Hans Hagen
2008-06-10 21:37 ` Arthur Reutenauer
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=20080613215227.GA13603@khaled-laptop \
--to=khaledhosny@eglug.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).