[luatex] multiple callbacks
Hans Hagen
pragma at wxs.nl
Sun Jan 4 18:27:05 CET 2009
Elie Roux wrote:
> Elie Roux a écrit :
>> I took Hans' example and modified it so that it compiles. I come up
>> with a minor Lua problem (see the last comment), and a strange
>> problems : it seems that callbacks are called two times... If someone
>> better than me in Lua can take a look...
>
> Update : a simple
>
> callback.register("hpack_filter",function(head,...)
> texio.write_nl("I am a callback")
> return head, true
> end,1)
no ,1 needed here; this is the luatex register function not the
callback.add
> writes two times "I am a callback", which is not the case for
it depends on the packing of boxes, and there can be much packing going
on (like for instance in the page builder), so even a simple
test
might give you one for 'test', one for the pagenumber, etc etc
> callback.register("post_linebreak_filter",function(h, groupcode, glyphes)
> texio.write_nl("I am a callback")
> return true
> end,1)
>
> that writes it only once, is it normal?
depends on the number of paragraphs
Hans
-----------------------------------------------------------------
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