[luatex] Vital RTL issues in LuaTeX

Khaled Hosny khaledhosny at eglug.org
Fri Apr 10 13:12:09 CEST 2009

On Fri, Apr 10, 2009 at 04:11:49PM +1000, وفا خلیقی wrote:
> With RTL and LuaTeX there are vital issues that is ignored currently:
> - It is not true that everything that was LTR in RTL mode should be the other
> way
> e.g: if you have \pagedir TRT \bodydr TRT \pardir TRT \textdir TRT, then
> everything will be RTL but there are issues:
> 1- In persian we read numbers from left to right (thirteen=13) but imagine in
> the table of contents, if the direction of the document is RTL, then instead 13
> we get 31 which is read 'thirty one' in Persian.

This has to be handled at a higher level, the engine don't know about
the directionality of individual characters, so you need to put numbers
inside {\textdir TRT } or write lua code that applies bidirectional
algorithm at node level.

> 2- There are things both in LTR and Persian (perhaps in RTL as well) that
> luatex's direction change does not make any sense, for example \leftline, \
> rightline, \raggedleft, \raggedright and etc. In both directions we want for
> example \leftline put some text at the left and \rightline put some text at the
> right hand side because that is what it should be but in LuaTeX in RTL, \
> leftline stands for \rightline and \rightline stands for \leftline which is
> nonesense.

Personally, I think this is desirable, so that macros and styles written
with LTR in mind, get mirrored in RTL, otherwise we will need to patch
every single document style for Arabic, like with TeX--XeT as used in
pdfTeX and XeTeX. However, you can swap the definitions at macro level
if you want to.


 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://tug.org/pipermail/luatex/attachments/20090410/3cd52553/attachment.bin 

More information about the luatex mailing list