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/\writeetc. - fontsystem
- Fonts
- gullet
- A
Gulletis the part of the engine that reads tokens from the input stream and expands them; including conditionals etc. - mouth
- A
Mouthprovides a stream ofTokens to be processed by an engine; either by tokenizing a file or by returning theTokens expanded by a macro - state
- The
Stateof a TeX engine keeps track of scoped (by TeX groups) values. - stomach
- utils
Structs§
- Default
Engine - Default implementation of a
TeXEnginefor the providedEngineTypes. - Default
Plain TeXEngine Types - Example implementation of
EngineTypesfor a plain TeX engine. - Engine
Aux - Auxiliary components passed around to
PrimitiveCommands. - Engine
References - 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§
- Engine
Extension - Additional components we want to add to a
EngineReferencescan be implemented here. Notably,()extends this trait if we don’t need any additional components. - Engine
Types - 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
TeXEnginecombines all necessary components (seeEngineTypes) to compile a TeX file into some output format.
Type Aliases§
- Plain
TeXEngine - A plain TeX engine with default components.