[Dev-luatex] return value of filter callbacks
Khaled Hosny
khaledhosny at eglug.org
Fri Nov 5 14:22:06 CET 2010
On Fri, Nov 05, 2010 at 01:59:54PM +0100, Manuel Pégourié-Gonnard wrote:
> Hi,
>
> Sorry if this is very clear from the manual, maybe I just didn't read the part
> where it is explained (or I read it but was too stupid/tired to notice), but I
> don't understand the meaning of the return value of some callbacks.
>
> The first example (by order of apparition in the manual) is
> pre_linebreak_filter, whose calling convention is:
>
> function(<node> head, <string> groupcode)
> return true | false | <node> newhead
> end
>
> I think it's clear what returning a newhead node does, but I don't understand
> what returning true or false means for this callback. Other similar callbacks
> include post_linebreak_filter, (h|v)pack_filter, pre_output_filter, etc.
I think it is explained in section 4.1:
For some minor speed gain, you can assign the boolean false to the
non-file related callbacks, doing so will prevent LuaTeX from executing
whatever it would execute by default (when no callback function is
registered at all). Be warned: this may cause all sorts of grief unless
you know exactly what you are doing! This functionality is present since
version 0.38.
Not sure about "true" though.
Regards,
Khaled
--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer
More information about the dev-luatex
mailing list