[luatex] [arthur.reutenauer at normalesup.org: Re: Support for Thai in LuaTeX]

Theppitak Karoonboonyanan theppitak at gmail.com
Sun May 19 07:09:04 CEST 2013

On Sat, May 18, 2013 at 6:08 PM, Arthur Reutenauer
<arthur.reutenauer at normalesup.org> wrote:

>   I am ready to help you if you want to implement word segmentation for
> Thai in LuaTeX, which surely would benefit Thai-speaking users of TeX.

Thanks. First of all, I have to learn Lua first.

>> With a quick search, I saw "linebreak_filter" callback in LuaTeX reference.
>> is that relevant to the problem?
>   Yes, that's one of the callbacks you can use to hook word segmentation
> into TeX's flow, and that's the one I would recommend.

Secondly, could you explain to me briefly what is passed to the callback,
and what it should output back?

I have got a Thai support library written in C which provides word breaking
API. Is it possible to write some code to plug it to Lua?

>>                                  or using external filter is already
>> acceptable?
>   You should be the one answering this question, as you're probably the
> only one on this list who's going to typeset Thai with LuaTeX: do you
> want to continue using an external filter?  LuaTeX provides ways to
> avoid that entirely, but of course that needs some additional code to be
> written.

Close integration should be better for general users. For me myself,
using external filter is fine. But many users are not happy with that.

>   In any case, LuaTeX is essentially compatible with pdfTeX, so whatever
> worked with pdfTeX should work with LuaTeX too.

The problem is that, currently, neither babel nor polyglossia can be used
within LuaLaTeX docuement. Therefore, even if I use the external filter,
some hard-coded macro for word break marker as used by the filter is
still needed in the preamble.

Theppitak Karoonboonyanan

More information about the luatex mailing list