Hi,
On 07/24/2011 07:48 PM, Khaled Hosny wrote:
On Tue, Jul 12, 2011 at 03:51:24PM +0200, Taco Hoekwater wrote:
Hi,
Now that the Unicode BiDi algorithm implementation discussion
seems to restart, it is a good time to ask the people involved
to solve the non-trivial problem of adjusting the algorithm
to cater for the inclusion of
* out-of-line node objects (\setbox, \box, \copy),
* out-of-line tokens (like alignment templates and macro expansions),
* vertical typesetting,
* TeX grouping levels,
* Interfering nodes (math, \special, \rule etc)
Some questions from me:
* local_par whatsit:
- it is always the 1st node in the list (if exists at all), right?
yes, it is and should remain the first node.
- \textdir inserts begindir node after it, is this a general rule?
yes
- what is the dir field is used for? I can query it but setting it (to
TRT for example) has no effect (the par still left aligned).
That could be a timing problem in the change, but I need a test file to
debug.
* when \pardir is set to TRT while \textdir is still TLT luatex will
enclose the paragraph with begindir/enddir TLT nodes (skipping the
local_par etc.), right? if yes, is there anyway to suppress this?
There is no way to suppress that, but it should not have ignored
local_par, I think. Again a test file would be helpful.
* how can I set paragraph direction to TRT without setting \pardir,
in pre_linebreak_filter?
head, info = tex.linebreak(head, {"pardir" = "TRT", ...})
This *will* overrule the 'dir' field in the local_par inside 'head'.
Best wishes,
Taco