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