Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpapercut committed Feb 5, 2024
1 parent c7ea8c5 commit b60500e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,25 @@
Typst math typesetting for the web.

## Getting started
> TODO
### 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.

0 comments on commit b60500e

Please sign in to comment.