typst / typst

A new markup-based typesetting system that is powerful and easy to learn.
https://typst.app
Apache License 2.0
32.31k stars 865 forks source link

Mermaid diagramming support? #161

Closed adamijak closed 1 year ago

adamijak commented 1 year ago

Do you plan to support https://mermaid.js.org ? I think it might be great way to generate graphs diagrams in typst.

k12ish commented 1 year ago

There's a couple of similar requests which involve supporting some markup language inside of Typst (eg. #184)

I don't think any of these will supported as a primitive in Typst, but rather Typst will allow you to write functions that parse and render your custom Markup language.

As the language and ecosystem evolve, I think we'll move towards a system where users can import libraries which provide such functions, but we are not there yet.

reknih commented 1 year ago

We cannot integrate Mermaid into the compiler, as it is a JavaScript library. However, we are planning on providing our own diagramming / charting tools in the future and may get inspiration there.