[luatex] multiple callbacks

Hans Hagen pragma at wxs.nl
Sun Jan 4 17:19:21 CET 2009


Arthur Reutenauer wrote:
>> Keep in mind that not all callbacks have the same i/o characteristics.
> 
>   I was aware of that, but did not know the details of each callback.
> I've been playing mostly with define_font.
> 
>> For example, 'process_input_buffer' has:
>>
>>   function(<string> buffer)
>>     return <string> adjusted_buffer
>>   end
> 
>   Therefore, the responsibility of calling the appropriate interface
> could maybe be left to the macro writer who calls the callback, not the
> author of the macro package?

well, one can create a caller for each type of callback, and many are 
similar

>> Btw, callback.add() could just return false when it detects a
>> conflict with an already existing function, and true otherwise.
>> Then the caller could decide how to handle the error.
> 
>   Sure, that would also be a possibility.

one can never catch alle errors; for instance a style could mess up the 
node list which can make luatex crash; one just has to assume that the 
writer does a decent job

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list