[luatex] Fribidi for LuaTeX

Khaled Hosny khaledhosny at eglug.org
Mon Jul 25 17:03:41 CEST 2011


On Mon, Jul 25, 2011 at 09:10:13AM +0200, Taco Hoekwater wrote:
> 
> >   - 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.

Here is a minimal example:

\directlua {
callback.register('pre_linebreak_filter',
    function(h)
        for n in node.traverse(h) do
            if n.id == 8 and n.subtype == 6 then
                n.dir = "TRT"
            end
        end
        return h
    end
)
}

Hello World!
\bye

> >* 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'.

I'm trying to make the code none intrusive as possible, and I'd like to
avoid fiddling with line breaking.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab


More information about the luatex mailing list