Hi i am trying to achieve something simular to this using typst and rust where do i start? https://pypi.org/project/latexbuild/ i noticed typst doesnt have templating am i going to have to implement that myself using tera too or something?
#How to i implement templating with typstlike latexbuild from python?
5 messages · Page 1 of 1 (latest)
I hadn't heard of latexbuild before, but if I understand correctly, the main three features of latexbuild are
- wrapping the calling of latex so that it's easier to handle
- outputting to multiple formats (html, pdf, docx)
- putting together documents from separate content and template sources places using Jinja2 templates
is that about right?
I think that the first and last are simply not needed with typst: calling the typst cli is simple, and you can write document templates without leaving Typst (just like LaTeX, but so simple that it's actually viable). The tutorial example shows how to achieve uniform styling, layout and common content for documents using a template.
For exporting to html (right now; it's a feature on the roadmap for Typst to do it out-of-the-box) you can try Quarto.
hi thanks for the response how would i programmatically generate the data to use in a .typ file? Is there like some serde crate for it that does this correctly or can i import .json instead?
Json is supported natively: https://typst.app/docs/reference/data-loading/json/
Ok good thanks that's everything I needed to know