On 10/28/2018 2:53 PM, Marcel Krüger wrote:
Hi,
according to the documentation, the `mode` field in `tex.nest` is explained as
a number representing the main mode at this level: 0 = no mode (this happens during \write), 1 = vertical, 127 = hor- izontal, 253 = display math, -1 = internal vertical, -127 = restricted horizontal, -253 = inline math
This looks as if these values were constant across engine versions, but the real values depend on `max_command_cmd` which changes if new commands are added. Especially the current values are `(-)132` for (restricted) horizontal mode and `(-)263` for (inline) math.
So I think the documentation should be either updated to delete these outdated values and instead include a note that you have to query these values yourself or LuaTeX could normalize these values before passing them to Lua.
One way to do this could be i'll give them names (hmode vmode innerhmode innervmode inlinemath displaymath none)
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 -----------------------------------------------------------------