Skip to main content

Module nodes

Module nodes 

Source
Expand description

Node memory: an arena of typesetting nodes addressed by NodeRef.

The node model mirrors LuaTeX’s. Node type ids, subtypes and field sets are those that LuaTeX’s node library reports (see data/luatex-node-types.txt). Lists are doubly linked through next and prev. List heads in the semantic nest are temp nodes, as in TeX.

Modules§

accent_sub
Accent subtypes.
fence_sub
Fence subtypes.
glue_sub
Glue subtypes (LuaTeX numbering).
glyph_sub
Glyph subtypes (bit flags).
id
Node type ids, numbered as LuaTeX’s node.types().
kern_sub
Kern subtypes.
list_sub
Subtypes of hlist and vlist nodes that math typesetting gives the boxes it builds (LuaTeX’s mathchar, vextensible, vdelimiter).
noad_opt
Noad option bits (LuaTeX manual, “Math core nodes”).
noad_sub
Noad subtypes (LuaTeX numbering).
radical_sub
Radical subtypes.
whatsit_sub
Whatsit subtypes.

Structs§

BoxData
Box fields shared by hlist and vlist nodes.
FenceData
Fields of a fence noad (\left, \middle, \right).
FractionData
Fields of a generalized fraction noad.
GlyphData
Fields of a glyph node.
LuaRefs
The numbers LuaTeX gives the Lua values it keeps by reference (shown as <lua data reference N>), modelled as observed: a new reference takes the most recently released number, else the next one; freeing or overwriting a node’s value releases its number, copying the node takes a new one. Fonts made from Lua tables and luaotfload’s set-up hold references too.
NoadData
Fields of a noad (LuaTeX’s noad, radical and accent nodes). The nucleus and the scripts are kernel nodes (math_char, math_text_char, sub_box, sub_mlist), or null when empty.
Node
A node.
NodeRef
A reference to a node in the node arena; NodeRef::NULL is the empty list.
Nodes
The node arena.
Properties
LuaTeX’s node properties as the engine tracks them: which nodes have one, the mode set by node.set_properties_mode(flush, copy), and the frees and copies of such nodes since the Lua side last looked.
SyncFields
The SyncTeX fields (input tag and line) of the nodes, kept beside the arena while SyncTeX is on, so that runs without it pay nothing.

Enums§

LateData
Data of late whatsits: an unexpanded token list or a string.
NodeData
Type-specific node data.
PropEvent
What happened to a node with a Lua property (node.setproperty), for the Lua side to update its property table.
UserValue
The value of a user_defined whatsit, by its type (LuaTeX manual: a, d, l, n, s, t).
Whatsit
Whatsit payloads.

Constants§

DEFAULT_CODE
The fraction thickness meaning “the default rule thickness” (default_code).
LUATEX_NODE_TYPES
LuaTeX’s node types, fields and subtypes, as node.types(), node.fields() and node.subtypes() report them (data/luatex-node-types.txt, see data/README.md).
MAX_NESTING
The deepest nesting of boxes that is copied and shipped out (TeX builds at most 1000 levels at a time, LuaTeX ships out 20000 boxes nested in each other, and Lua code can make a box contain itself).
RUNNING
A “running” rule dimension (TeX’s null_flag, −2³⁰).

Functions§

glue_ratio
The glue set ratio num / den as LuaTeX stores it: the quotient is computed in double precision and kept as a C float (observed through tex.box[n].glue_set). The rounding shows at shipout, where the ratio multiplies the accumulated stretch or shrink (§625).
type_name
The Lua name of node type t (glue), from LUATEX_NODE_TYPES.

Type Aliases§

AttrList
A list of attribute (number, value) pairs, sorted by number.