class NoadNode
- supers: Node
First, there are the objects (the TeX book calls them โatomsโ) that are
associated with the simple math objects: ord
, op
, bin
, rel
, open
, close
, punct
,
inner
, over
, under
, vcent
. These all have the same fields, and they are combined
into a single node type with separate subtypes for differentiation.
Some noads have an option field. The values in this bitset are common:
meaning | bits |
---|---|
set | 0x08 |
internal | 0x00 + 0x08 |
internal | 0x01 + 0x08 |
axis | 0x02 + 0x08 |
no axis | 0x04 + 0x08 |
exact | 0x10 + 0x08 |
left | 0x11 + 0x08 |
middle | 0x12 + 0x08 |
right | 0x14 + 0x08 |
no sub script | 0x21 + 0x08 |
no super script | 0x22 + 0x08 |
no script | 0x23 + 0x08 |
Example:
assert.node_type("noad", nil, {
id = "noad (18)",
subtypes = {
"ord (0)",
"opdisplaylimits (1)",
"oplimits (2)",
"opnolimits (3)",
"bin (4)",
"rel (5)",
"open (6)",
"close (7)",
"punct (8)",
"inner (9)",
"under (10)",
"over (11)",
"vcenter (12)",
},
fields = {
"prev (-1)",
"next (0)",
"id (1)",
"subtype (2)",
"attr (3)",
"nucleus (4)",
"sub (5)",
"sup (6)",
},
})
Reference:
- Corresponding C source code: texnodes.c#L892-L896
๐ฑ Types incomplete or incorrect? ๐ Please contribute!
fields
NoadNode.subtype
NoadNode.attr
NoadNode.attr : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
A list of attributes.
NoadNode.nucleus
NoadNode.nucleus : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
base
NoadNode.sub
NoadNode.sub : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
subscript
NoadNode.sup
NoadNode.sup : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
superscript
NoadNode.options
bitset of rendering options