Crate texlang

source ·
Expand description

Texlang: a TeX language interpreter.

This crate implements a general purpose TeX language interpreter called Texlang.

Most of the high level documentation is provided in the Texcraft website, including guided introductions to using Texlang to build TeX interpreters. The documentation here is mostly for reference.


  • Texlang commands API
  • Error types and error display logic.
  • Logic for parsing elements of the TeX grammar from token streams.
  • Implementation of TeX user defined macros.
  • TeX tokens and category codes.
  • Module that re-exports all of the crate’s traits.
  • Texlang variables API
  • The Texlang virtual machine (VM).


  • This macro is for implementing the HasComponent trait in the special (but common) case when the state is a struct and the component is a direct field of the struct.