[lltx] bidi package extended for LuaLaTeX

Khaled Hosny khaledhosny at eglug.org
Sun Apr 4 12:45:45 CEST 2010


On Sat, Apr 03, 2010 at 12:30:44PM +1100, Vafa Khalighi wrote:
> 
> 
> On Sat, Apr 3, 2010 at 12:25 PM, Vafa Khalighi <vafa at users.berlios.de> wrote:
> 
> 
> 
> 
>         It can, but is it really needed (i.e. I can switch the whole package
>         layout in very few lines of tex code in luatex, with tex-xet it needs
>         hundreds of package specific macro redefinitions, one definitely can do
>         the later with luatex too.)
> 
> 
> 
>     You are only looking at bidi implementation from one side and that is just
>     using mainly RTL. Yes, if one wants to use mainly RTL, there is not much to
>     do because you have got \pagedir TRT to use. But I am afraid that is just a
>     narrow perspective, you have got also to consider other users who use RTL
>     partially, i.e. they mainly use LTR, but typeset some RTL text, then \
>     pagedir TRT does not make sense at all and they have got to typeset (just
>     as an example) tabular RTL sometimes. The bidi implementation needs to suit
>     everyone, and not just a group of people and this has unfortunately some
>     costs and that is definitely going to be macro programming for many
>     packages. You think bidi implementation is easy, but it is not. It is the
>     most complex and sophisticated matter in TeX, both logically and
>     technically.
> 
> 
> 
> 
> 
> Even if one uses RTL mainly, there is considerable amount of macro programming
> to do. Why? consider an example, say tabular again, if you typeset tabular,
> then the place of "r" and "l" alignment interchanges which is a bug, so you
> have got to come and fix that. There is no single tabular package so you have
> got to fix that for every single tabular package because they use different
> implementations and the implementation of package x is not compatible with
> implementation of package y. Furthur, \pagedir TRT does not make tabular RTL in
> latex, which I sent you the solution before.

I simply swap the meaning of r and l in my head, which means less code
to write, and I get all table package to work without any effort, also
if I've code to generate tables (or if I copy tables from rtl to ltr
parts of the document) I get the same expected result without altering
my tables, try:

\documentclass{article}

\begin{document}
\begin{tabular}{ l c r }
  aa & 2 & ggg \\
  bcd & 5 & cd \\
  e & 8 & f \\
\end{tabular}

\bgroup
\luatexmathdir TRT
\begin{tabular}{ l c r }
  aa & 2 & ggg \\
  bcd & 5 & cd \\
  e & 8 & f \\
\end{tabular}

\egroup
\end{document}

The cells will be aligned as expected, though in the second table right
is actually left etc.

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


-- 
To unsubscribe, reply using "remove me" as the subject.



More information about the lualatex-dev mailing list