Typst math typesetting for the web.
Install wypst with npm:
npm install wypst
You can import wypst as an ECMAScript module:
import wypst from 'wypst';
To render a Typst math expression, you can use either render
or renderToString
, as the example below shows:
wypst.render('sum_(n >= 1) 1/n^2 = pi^2/6', element); // Renders into the HTML element
wypst.renderToString('sum_(n >= 1) 1/n^2 = pi^2/6'); // Renders into an HTML string
All help is welcome. Please see CONTRIBUTING.
As of now wypst is very experimental, so you may encounter lots of bugs. I expect to have most fixed by mid March.