class LateLuaWhatsitNode
- supers: WhatsitNode
The difference between data
and string
is that on assignment, the
data
field is converted to a token list, cf. use as latelua
. The
string
version is treated as a literal string.
When a function is used, it gets called with as first argument the node that triggers the call.
Example:
assert.node_type("whatsit", "late_lua", {
id = "whatsit (8)",
subtype = "late_lua (8)",
fields = {
"prev (-1)",
"next (0)",
"id (1)",
"subtype (2)",
"attr (3)",
"reg (4)",
"data (5)",
"name (6)",
"string (7)",
},
})
Reference:
- Corresponding C source code: texnodes.c#L1022-L1027
😱 Types incomplete or incorrect? 🙏 Please contribute!
fields
LateLuaWhatsitNode.attr
LateLuaWhatsitNode.attr : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
A list of attributes.
LateLuaWhatsitNode.data
the to be written information stored as Lua value
LateLuaWhatsitNode.token
the to be written information stored as token list
LateLuaWhatsitNode.name
the name to use for Lua error reporting