diff --git a/README.md b/README.md index ee3ec41..85dee42 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,25 @@ Typst math typesetting for the web. ## Getting started -> TODO \ No newline at end of file +### Installation +Install wypst with npm: +```bash +npm install wypst +``` +### Importing +You can import wypst as an ECMAScript module: +```javascript +import wypst from 'wypst'; +``` +### Rendering Typst Math +To render a Typst math expression, you can use either `render` or `renderToString`, as the example below shows: +```javascript +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 +``` + +## Contributing +> TODO + +## Disclaimer +As of now wypst is very experimental, so you may encounter lots of bugs. I expect to have most fixed by mid March.