1 unstable release
0.0.1 | Jul 22, 2023 |
---|
#49 in #tex
315KB
5.5K
SLoC
Work In Progress
An implementation of a generic TeX engine, the core of the TeX typesetting system. This crate largely follows an object-oriented design for modularity and adaptability, with functionality largely implemented in generic traits. This lets the compiler optimize the code for the specific types used, while still allowing for easy customization.
lib.rs
:
Work In Progress
An implementation of a generic TeX engine, the core of the TeX typesetting system. This crate largely follows an object-oriented design for modularity and adaptability, with functionality largely implemented in generic traits. This lets the compiler optimize the code for the specific types used, while still allowing for easy customization.
A specific Engine
combines:
- a
Mouth
that providesToken
s to process - a
Gullet
that expands macros and returns primitives (StomachCommand
s), - a
State
that keeps track of the current state of the engine, e.g. the currentCategoryCodeScheme
, and allows for pushing/popping the stack, - a
Stomach
that processes theStomachCommand
s and returnsTeXBox
es.
Almost all algorithms, too, are generic over implementations of these traits.
The default Engine
for plain TeX/LaTeX can be found
in PlainTeXEngine
.
Dependencies
~4–10MB
~108K SLoC