Crate mdbook_typst_math

Crate mdbook_typst_math 

Source
Expand description

mdbook-typst-math - An mdbook preprocessor to render math using Typst

This crate provides a preprocessor for mdbook that converts LaTeX-style math blocks into SVG images rendered by Typst.

§Usage

Add the preprocessor to your book.toml:

[preprocessor.typst-math]

§Configuration

The preprocessor supports the following configuration options:

  • preamble: Typst code to prepend to all math blocks
  • inline_preamble: Typst code to prepend to inline math blocks
  • display_preamble: Typst code to prepend to display math blocks
  • fonts: List of font directories to load
  • cache: Directory for caching downloaded packages

Structs§

TypstProcessor
The main preprocessor that converts math blocks to Typst-rendered SVGs.
TypstProcessorOptions
Options that control how Typst renders math blocks.