On 2/5/2019 10:04 AM, Linas Stonys wrote:
you can use the builder callbacks to implement a before_display
handler so there is no need to add something (like expanding a token
list)
Amazing things can by done within lua node processing. I could find
these places and remove the empty lines and edit the skips. But lua
processing will cost more time than primitives. And it will be easy to
trace the tex side.
adding extra token registers related primitives that then need to be
checked and add code (and cache misses) also costs ... the hook you
mention is just one of dozens that can be added because some package
needs them (i can think of some for context) ... basically you then end
up with a token list expanded before and after each callback point
because your case is just one of the many
it's what we explcititly didn't want to do: add more and more such
things (esp because they don't solve timing issues)
things like tracing ... if your callback just print back to tex
something \the\myfoo and then you're still at the tex end
the overhead of a callback that justs checks if it's at display start
and only then do something is not that large (after all, after that some
other work is done which also costs); i'm pretty sure that worse
bottlenecks can be found; also, flexibility comes at a price
"before_display" seems to be hooked some where at \everydisplay place
because the lastskip is already gone. Check the example:
vertical spacing is tricky anyway so you can probably best run over the
list-so-far then and remove stuff if needed
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex