[luatex] lua script on the run

Khaled Hosny khaledhosny at eglug.org
Thu Jan 6 15:00:12 CET 2011


On Thu, Jan 06, 2011 at 02:42:50PM +0100, Philipp Stephani wrote:
> Am 06.01.2011 um 13:12 schrieb Khaled Hosny:
> 
> > May be you can use "process_input_buffer" callback, but this gets the
> > raw input before luatex even processing it so you have to be careful
> > with control sequences and so.
> 
> It is next to impossible to find out from the input where math mode is active, given the millions of possibilities to start math input.

That what I meant, he either be careful about what to replace or things
get messed up.

> > Or you can do the processing on the node list, but then you can't used
> > regular text processing functions (gsub, lpeg, etc.)
> 
> And before you arrive at a node list, TeX will already have complained about ^ outside math mode. Probably a token_filter callback would work better.

I was not thinking about this particular case, one can use tex-friendly
transliteration scheme but still need to escape non-textual material
which makes node list processing appealing. I would have suggested
token_filter but tex tokens are beyond my understanding.

Regards,
 Khaled

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


More information about the luatex mailing list