This project contains three parts :
- The
typst-math-rustfolder contains the Rust code for the WebAssembly module. It parses a text document to an AST and compute the math symbols to render. - The
typst-math-macrosfolder contains helper macros for the Rust code. - The main folder contains the TypeScript code for the VS Code extension.
git clone https://github.com/supersurviveur/typst-math.git
cd typst-mathTo build the WebAssembly module, you need to install wasm-pack
cd typst-math-rust
wasm-pack build --target nodejsThen you can run the extension by opening the project in VS Code and pressing F5 to start a debug session.
It can be compiled with npm run package and a vsix file can be generated with vsce package.
You can run tests with cargo test, and see test coverage by running coverage.sh.
A few rendering modes are available :
nothing: No renderingbasic: Only greek letters and shorthands are renderedmedium: Attachments are renderedcomplex: Functions are rendered