class DirNode
- supers: Node
Direction specifiers are three-letter combinations of T
, B
,
R
, and L
. These are built up out of three separate items:
- the first is the direction of the “top” of paragraphs
- the second is the direction of the “start” of lines
- the third is the direction of the “top” of glyphs
However, only four combinations are accepted: TLT
, TRT
, RTT
, and LTL
. Inside actual dir
nodes, the representation of
dir
is not a three-letter but a combination of numbers. When printed the
direction is indicated by a +
or -
, indicating whether the value
is pushed or popped from the direction stack.
Example:
assert.node_type("dir", nil, {
id = "dir (10)",
subtypes = { "normal (0)", "cancel (1)" },
fields = {
"prev (-1)",
"next (0)",
"id (1)",
"subtype (2)",
"attr (3)",
"dir (4)",
"level (5)",
},
})
Reference:
- Corresponding C source code: texnodes.c#L753-L756
😱 Types incomplete or incorrect? 🙏 Please contribute!
fields
DirNode.attr
DirNode.attr : Node {
next: Node?,
prev: Node?,
id: integer,
subtype: integer,
head: Node?,
attr: Node,
}
A list of attributes.
DirNode.dir
the direction (but see below)
DirNode.level
nesting level of this direction whatsit