Skip to main content

Module engine

Module engine 

Source
Expand description

A TeX engine combines all the necessary components into a struct capable of compiling a TeX file into some output format.

Modules§

filesystem
Accessing files on \input, \open/\write etc.
fontsystem
Fonts
gullet
A Gullet is the part of the engine that reads tokens from the input stream and expands them; including conditionals etc.
mouth
A Mouth provides a stream of Tokens to be processed by an engine; either by tokenizing a file or by returning the Tokens expanded by a macro
state
The State of a TeX engine keeps track of scoped (by TeX groups) values.
stomach
utils

Structs§

DefaultEngine
Default implementation of a TeXEngine for the provided EngineTypes.
DefaultPlainTeXEngineTypes
Example implementation of EngineTypes for a plain TeX engine.
EngineAux
Auxiliary components passed around to PrimitiveCommands.
EngineReferences
This struct combines all the necessary components for use in PrimitiveCommands. We use public fields instead of accessor methods to convince the borrow checker that all the components are independent, and avoid “Cannot borrow as mutable because already borrowed as immutable” errors.

Traits§

EngineExtension
Additional components we want to add to a EngineReferences can be implemented here. Notably, () extends this trait if we don’t need any additional components.
EngineTypes
The types that an engine needs to implement. To reduce overhad in function signature, we bundle all of them into a single trait and pass that around.
TeXEngine
A TeXEngine combines all necessary components (see EngineTypes) to compile a TeX file into some output format.

Type Aliases§

PlainTeXEngine
A plain TeX engine with default components.