class UserDefinedWhatsitNode
- supers: WhatsitNode
User-defined whatsit nodes can only be created and handled from Lua code. In effect, they are an extension to the extension mechanism. The LuaTeX engine will simply step over such whatsits without ever looking at the contents.
Example:
assert.node_type("whatsit", "user_defined", {
id = "whatsit (8)",
subtype = "user_defined (9)",
fields = {
"prev (-1)",
"next (0)",
"id (1)",
"subtype (2)",
"attr (3)",
"user_id (4)",
"type (5)",
"value (6)",
}
})
Reference:
- Source file of the
LuaTeX
manual: luatex-nodes.tex#L833-L864
😱 Types incomplete or incorrect? 🙏 Please contribute!
fields
UserDefinedWhatsitNode.user_id
id number
UserDefinedWhatsitNode.type
The type
can have one of six distinct values. The number is the ASCII value if the first character of the type name (so you can use string.byte("l") instead of 108
): 97 “a” list of attributes (a node list), 100 “d” a Lua number, 108 “l” a Lua value (table, number, boolean, etc), 110 “n” a node list, 115 “s” a Lua string, 116 “t” a Lua token list in Lua table form (a list of triplets).