On 2/4/2019 3:22 PM, Linas Stonys wrote:
Hi luatex developers, I want to ask your opinion about new hook (token list) "\everypredisplay". This should work just before $$ (display start) while math group is not started. There is \everydisplay but it works immediately after math mode start. Why one would need it? Now there is now how to control spaces between to equations. Lets say journal requires spaces around displays (and in display inner lines) and text 6pt.
I can do with tex macros by hooking into every latex display environment and putting some code right before $$. In that code I add \par; then I do manipulations of \abovedisplayskip by checking \lastskip; and controling \panalty by looking at \prevgraf. Finaly I add \noindent to remove empty boxes.
Everything is perfect while I do not get plain display makros $$ a+b $$. Manualy to retype them is not an option. So the hook of \everypredisplay where \par could work would be very useful.
What do you think? 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)
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 -----------------------------------------------------------------