![](https://secure.gravatar.com/avatar/ab73c799733cb79686500b0adbf33bb8.jpg?s=120&d=mm&r=g)
Hallo, I tried the following -------------------------------------- \starttext \startluacode local OldPreLB function MyPreLB(head,gc) texio.write_nl("########### Here I am!") OldPreLB(head,gc) end OldPreLB = callback.find('pre_linebreak_filter') callback.register('pre_linebreak_filter',MyPreLB) \stopluacode Test \stoptext -------------------------------------- but MyPreLB() is not called. What I am doing wrong here? Wolfgang
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Thu, Apr 08 2010, Wolfgang Werners-Lucchini wrote:
[...]
but MyPreLB() is not called. What I am doing wrong here?
Hello Wolfgang, I don't know, but I've played a bit with your example file: \starttext \startluacode local OldPreLB function MyPreLB(head,gc) tex.print("Here I am!") return OldPreLB(head,gc) end local id, error = callback.register('pre_linebreak_filter', MyPreLB) if id == nil then tex.print("Error string:", type(error), "\\par") end \stopluacode Problem: callback.register returns nil, but no error message. \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
![](https://secure.gravatar.com/avatar/2259586bbe3f45ed8564afe9bd7a8439.jpg?s=120&d=mm&r=g)
2010/4/9 Wolfgang Werners-Lucchini
Hallo,
I tried the following
-------------------------------------- \starttext \startluacode local OldPreLB
function MyPreLB(head,gc) texio.write_nl("########### Here I am!") OldPreLB(head,gc) end
OldPreLB = callback.find('pre_linebreak_filter') callback.register('pre_linebreak_filter',MyPreLB) \stopluacode
Test \stoptext --------------------------------------
but MyPreLB() is not called. What I am doing wrong here?
Hi Wolfgang, see http://www.ntg.nl/pipermail/ntg-context/2010/047018.html -- Best regards, Li Yanrui (李延瑞)
participants (3)
-
Li Yanrui (李延瑞)
-
Peter Münster
-
Wolfgang Werners-Lucchini