class Node
A node that comprise actual typesetting commands. A few fields are present in all nodes regardless of their type, these are:
Reference:
- Source file of the
LuaTeX
manual: luatex-nodes.tex#L49-L76
😱 Types incomplete or incorrect? 🙏 Please contribute!
fields
Node.next
the next node in a list, or nil
Node.prev
That prev field is always present, but only initialized on explicit request: when the function node.slide()
is called, it will set up the prev
fields to be a backwards pointer in the argument node list. By now most of TeX's node processing makes sure that the prev
nodes are valid but there can be exceptions, especially when the internal magic uses a leading temp
nodes to temporarily store a state.
Node.id
the node’s type (id) number
Node.subtype
the node subtype identifier. The subtype
is sometimes just a dummy entry because not all nodes actually use the subtype
, but this way you can be sure that all nodes accept it as a valid field name, and that is often handy in node list traversal.
Node.head
Node.attr
Node.attr : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
A list of attributes.. almost all nodes also have an attr
field