Skip to main content

Module nodes

Module nodes 

Source
Expand description

TeX Nodes that end up in the final document.

Split into three types: vertical, horizontal and math nodes, each with a corresponding NodeList type.

Modules§

boxes
TeXBoxes
horizontal
Nodes allowed in horizontal lists.
math
Nodes allowed in math mode
vertical
Nodes allowed in vertical lists.

Structs§

BoxTarget
Once a box is closed, something is supposed to happen to it; most commonly, it is just added to the parent node list; but occasionally, something else should happen to it - e.g. \setbox5\hbox{...} implies that after the node list of the box is closed, it should be put into the box register with index 5 instead. This struct abstracts over that by carrying a continuation function to be called when the box is closed.
DisplayNode
Helper struct that implements Display and uses NodeTrait::display_fmt to yield a human-readable string.
Leaders
A \leaders node, as produced by \leaders, \cleaders or \xleaders.
ListTarget
Once a node list is closed, something is supposed to happen to it; most commonly, it is a box-list; but occasionally, something else should happen to it - e.g. \vadjust{...} adds the list’s contents as a vertical adjustment, a^{...} adds it to the superscript-field of the a.character etc. This struct abstracts over that by carrying a continuation function to be called when the list is closed.
WhatsitNode
A Whatsit node, essentially representing a callback to the engine to be executed at shipout, as produced by e.g. \special or \write.

Enums§

LeaderBody
The body of a Leaders node; either a box or a rule.
LeaderSkip
The skip length along which a Leaders node should be repeated.
LeaderType
The type of a Leaders node (i.e. whether it was produced by \leaders, \cleaders or \xleaders).
NodeList
A node list, i.e. an open list of Nodes currently being built.
NodeType
The type of a Node, as returned by \lastnodetype

Traits§

CustomNodeTrait
Trait to implement for engine-specific new node types. Needs to implement NodeTrait and Into<ET::CustomNode>. Is implemented by () for engines that do not have additional node types beyond the default ones.
NodeTrait
Common trait for all nodes that end up in the final document.

Functions§

display_do_indent
Produces a \n followed by indent-many spaces - i.e. does the indentation for crate::tex::nodes::NodeTrait::display_fmt.

Type Aliases§

WhatsitFunction