I am very excited about HTML export! HTML is much better at responsiveness and accessibility.
Typst is such a great software. With it's modern programming language like syntax I learned it much faster than Latex. It's compile duration is also much better in my experience. I am honestly more productive using Typst it this point. Though I am not a power user. I only used it for slides and notation heavy articles.
Exactly. I like to output PDFs with exact layout, and then output to HTML with approximate layout for flowing, ease of use.
Small report from personal experience: I wrote the documentation for a project (~ half a bachelors thesis) with Typst. The writing experience was easy and nice, much better compared to the few Latex documents I worked on. Two main struggles I remember:
- We split the "paper" into multiple Typst files. While this organized our content nice, the VSC extension didn't recognize the bibliography imported in another file and displayed errors. Nothing major but certainly annoying.
- It couldn't deal well with SVGs and diagrams in general, so we resorted to just export graphics and include them as images.
6/10 would use again and I'm excited for the new release.
> the VSC extension didn't recognize the bibliography imported in another file and displayed errors. Nothing major but certainly annoying.
FYI the workaround to solve this is to go to the "root" file and run the "pin current file as main" or something like that of your Typst LSP. Unfortunately this needs to be done every time you reopen your project.
IIRC that helped somewhat, but didn't solve all issues. For my thesis I plan to use a single document.
Wow! They are really adding HTML support!
Typst is one of my favourite open source projects right now, mostly due to how useful it is even for non-technical users. I have converted most of my friends and their friends in my university to switch from latex / markdown / word to typst, mostly due to its ease of use, how nice does (even the default) output looks like and how powerful it is.
I am very happy that typst is still being developed and I am really surprised how many new features they add (for my use-cases it is pretty much done product:)).
After reading Laurenz's blog post on TeX vs Typst layout [1], it made me wonder: how hard would it be at this point for them to make Typst directly understand TeX, and let you insert chunks of TeX. It would make for a really nice upgrade path. Of course, being bug-for-bug compatible once people layer on tons of TeX packages seems like a losing game. But if most straightforward TeX stuff "just worked", it would be an easy way to upgrade one paragraph at a time…
> There is a Typst package called MiTeX that supports at least some basic TeX input.
I can see that being useful for lots of people, but, as a migration path (as I understood your parent https://news.ycombinator.com/item?id=43106837 to suggest), I don't think it would work. I've worked with TeX for almost 30 years and used vim for about 20 years, and suspect that "supports … some basic TeX" is likely to have the same effect for me as something that emulates vim does on a master-level vimmer—falling into the uncanny valley that's somehow worse than a totally different thing.
Did you try the MuchPDF package mentioned near the bottom of that discussion? It seems to do the job for what I tried.
Tl;dr it's because they don't want to neglect the other output formats PNG and SVG. For those they'd have to render the PDF, for which there is apparently no satisfactory rust package.
> no satisfactory rust package
I'm seeing this delay lots of features in rust projects.
For example helix the text editor hasn't gotten file watching (for the purposes of updating after external edits) for years now because of apparent problems with the file watching library in rust.
Typst's file watching seems to work excellent since 0.12, though.
and there's no nice way to insert PDF using WebASM, which is their first-tier support and monetization platform (i.e. 1st party Overleaf)
I need to play with Typst. I've been using Markdown and converting that to LaTeX with Pandoc for quite awhile, and that more or less works, but I've had issues when I need any non-standard formatting, like specific placement of something like a title page.
Typst looks like it might be the solution to this problem.
Yeah, last week, I took a few minutes to convert my mdbook draft to typst (most of it was renaming files, adding a main,typ and replacing `*` with `*`, `#` with `=` - I didn't have any tables), then happily proceeded from there and towards a beautiful (draft) book.
I'm quite happy about the workflow.
Plus now I have a template that I'll apply to the second book.
Hey, I've just finished typesetting the first editors-ready draft for a book using typst 0.13-rc1!
I love it.
I just love how responsive the editor is.
The biggest downside is that now I dread switching to overleaf after typst!
Has anyone used Typst for academic conferences/journals?
To me it’s sorta like CSS where the availability of templates is more important than the core language (at least for people lacking design abilities).
Nice! Excited about HTML export. I used LaTeX for autogenerating some semi-legal documents in both PDF and HTML, so all editing happens on Github and Github Actions do the rest for publishing PDFs and updating site. Started using Typst for some of these, but HTML export was a missing piece to completely switch to it.
I started using Typst this year and am really liking it so far. The rendered document updates as you type, and it's easier to code grid layouts. I like how I don't need to be paranoid about adding "%" at the end of lines, lest extra spaces sneak in.
The only downside of typst is that there is no libtypst, which would make it easy to embed.
That’s a rust library or rather typst code also gets published to crates.io.
But it’s not something that can be turned into a libtypst.so/dylib/dll.
You can turn a Rust library into a dynamic library w/ a C ABI - exposing the whole API would be tedious, even with tools like bindgen, but if you just want to provide a "render this char* to PDF" function (or whatever) then it's pretty easy [1].
I know of a few Rust crates that offer something like this - Minijinja, off the top of my head.
Yeah but than I would need to maintain the wrapper lib.
Typst is cool, but sadly (I checked with experts on the discord), there is still no way to simplify legal citations to create a table of authorities; you'd have to mark each one manually somehow, just like in Word. (Every single citation to a case or source in a legal brief might be a different string: the "canonical" citation might appear once in the actual text, or not at all.)
I've been following the HTML export thread, good to see some progress.
I've experimented with 'transpiling' to RST with Pandoc for purposes of digital documentation - but it's not quite there. Would love to see a flavour of Typst that could be viable for digital documentation with a decent live preview experience in VSCode.
I know this isn't the purpose of Typst, but one can hope. Would also welcome advice on this subject of decent authorship digital documentation - some of these frameworks are quite frankly massive, unweildy and painful to deal with.
Is this a LaTeX killer yet?
As long as I don't have to submit a paper, I always use Typst nowadays for PDF generation. So for me that answer is a yes. (I also wrote my PhD thesis in typst and the thesis was accepted.)
Out of curiosity, what was the thesis about? Can you share the PDF?
Predicting dropout in special forces selection.
Yes I (semi) wasted some time to setup a repository including CI: https://thesis.huijzer.xyz/. Link to source code and pdf are on that site. I hope it can satisfy your curiosity :p
Thanks, I’ve read the first part, it’s interesting that there’s no difference between selected candidates and dropouts. Also, pretty nice example of typist :)
It's definitely an excellent example of complex but real typst code. Thanks for sharing!
Probably not for scientific publishing until journals and conferences provide Typst templates as they do with LaTeX. I wish it will happen, to be honest it would be great to get rid of LaTeX. It's old and it shows a lot, a replacement is long overdue.
I've migrated everything I did in LaTeX to Typst. Books (I've written 12 books), invoicing, slides, and handouts. Happy to never touch LaTeX again.
How's the typesetting and justification nowadays? Last time I committed to it for a few months I found the latter to be about the quality of HTML with a better linebreak algorithm.
They implemented the same algorithm that TeX uses.
If I weren't on mobile I'd link you to the line in the source code. Just search the repo for Knuth-Plass.
I'm aware it uses the same algorithm, but the end result is still worse. Before Typst, I tried typesetting in HTML in an effort to escape LaTeX, and the results I got using an implementation of this same algorithm was very similar to what Typst ended up achieving, which is noticeably worse than LaTeX.
Mind you, I loved programming in Typst, and I wrote some plugins before it got its package manager, but I ended up moving back to LaTeX for this difference in quality of the final output. I should do some in depth testing at some point, because I am looking to switch back.
I'm using it for pretty much all new document generation tasks that are targeted to PDF, and it's very low fuss. Takes under 2 seconds to generate a 1600 page planner PDF with embedded images on many pages. I'd suggest giving it a try, unless you need certain journal templates.
The library of journal templates in the Typst universe is growing day by day. A much bigger issue is some of these journals not yet accepting Typst submissions.
Mostly. The inability to include pdf figures is an annoyance that forces a change in workflow compared to tex. That and needing to submit .tex files for journal publication.
From a technical perspective, yes. From a social perspective, maybe. It needs a lot more community support and adoption, but it's on an excellent trajectory.
AFAIK, Typst doesn’t handle multilanguage documents well, and hyphenation in particular. I had to go back to XeTeX because of this.
Totally.
markdown + latex templates + pandoc is the dream combo. no need to learn a new syntax like typst or emacs org-mode.
Plus ad hoc markdown extensions, Lua plugins, ... For me it's Typst.
If it works for you, great. Some people need the features Typst (or LaTex) provides.
Looks wonderful!
The "curve" example is a box
I watched the video presentation going over the new features, and the poor developer looks like he really needs a rest.
I think that was everyone's first thought! It's the first comment on the video too!
I am very excited about HTML export! HTML is much better at responsiveness and accessibility.
Typst is such a great software. With it's modern programming language like syntax I learned it much faster than Latex. It's compile duration is also much better in my experience. I am honestly more productive using Typst it this point. Though I am not a power user. I only used it for slides and notation heavy articles.
Exactly. I like to output PDFs with exact layout, and then output to HTML with approximate layout for flowing, ease of use.
To create HTML from typst also have a look at https://myriad-dreamin.github.io/shiroa/introduction.html and https://github.com/Myriad-Dreamin/typst.ts .
Small report from personal experience: I wrote the documentation for a project (~ half a bachelors thesis) with Typst. The writing experience was easy and nice, much better compared to the few Latex documents I worked on. Two main struggles I remember:
- We split the "paper" into multiple Typst files. While this organized our content nice, the VSC extension didn't recognize the bibliography imported in another file and displayed errors. Nothing major but certainly annoying.
- It couldn't deal well with SVGs and diagrams in general, so we resorted to just export graphics and include them as images.
6/10 would use again and I'm excited for the new release.
> the VSC extension didn't recognize the bibliography imported in another file and displayed errors. Nothing major but certainly annoying.
FYI the workaround to solve this is to go to the "root" file and run the "pin current file as main" or something like that of your Typst LSP. Unfortunately this needs to be done every time you reopen your project.
IIRC that helped somewhat, but didn't solve all issues. For my thesis I plan to use a single document.
Wow! They are really adding HTML support!
Typst is one of my favourite open source projects right now, mostly due to how useful it is even for non-technical users. I have converted most of my friends and their friends in my university to switch from latex / markdown / word to typst, mostly due to its ease of use, how nice does (even the default) output looks like and how powerful it is.
I am very happy that typst is still being developed and I am really surprised how many new features they add (for my use-cases it is pretty much done product:)).
After reading Laurenz's blog post on TeX vs Typst layout [1], it made me wonder: how hard would it be at this point for them to make Typst directly understand TeX, and let you insert chunks of TeX. It would make for a really nice upgrade path. Of course, being bug-for-bug compatible once people layer on tons of TeX packages seems like a losing game. But if most straightforward TeX stuff "just worked", it would be an easy way to upgrade one paragraph at a time…
[1] https://laurmaedje.github.io/posts/layout-models/
There is a Typst package called MiTeX that supports at least some basic TeX input.
[1] https://typst.app/universe/package/mitex
> There is a Typst package called MiTeX that supports at least some basic TeX input.
I can see that being useful for lots of people, but, as a migration path (as I understood your parent https://news.ycombinator.com/item?id=43106837 to suggest), I don't think it would work. I've worked with TeX for almost 30 years and used vim for about 20 years, and suspect that "supports … some basic TeX" is likely to have the same effect for me as something that emulates vim does on a master-level vimmer—falling into the uncanny valley that's somehow worse than a totally different thing.
Oh, wow. That's fantastic!
>let you insert chunks of TeX
Honestly a better first step would be getting inserting another pdf plot to work, but seems hard https://github.com/typst/typst/issues/145
Did you try the MuchPDF package mentioned near the bottom of that discussion? It seems to do the job for what I tried.
Tl;dr it's because they don't want to neglect the other output formats PNG and SVG. For those they'd have to render the PDF, for which there is apparently no satisfactory rust package.
> no satisfactory rust package
I'm seeing this delay lots of features in rust projects.
For example helix the text editor hasn't gotten file watching (for the purposes of updating after external edits) for years now because of apparent problems with the file watching library in rust.
Typst's file watching seems to work excellent since 0.12, though.
and there's no nice way to insert PDF using WebASM, which is their first-tier support and monetization platform (i.e. 1st party Overleaf)
I need to play with Typst. I've been using Markdown and converting that to LaTeX with Pandoc for quite awhile, and that more or less works, but I've had issues when I need any non-standard formatting, like specific placement of something like a title page.
Typst looks like it might be the solution to this problem.
Yeah, last week, I took a few minutes to convert my mdbook draft to typst (most of it was renaming files, adding a main,typ and replacing `*` with `*`, `#` with `=` - I didn't have any tables), then happily proceeded from there and towards a beautiful (draft) book.
I'm quite happy about the workflow.
Plus now I have a template that I'll apply to the second book.
Hey, I've just finished typesetting the first editors-ready draft for a book using typst 0.13-rc1!
I love it.
I just love how responsive the editor is.
The biggest downside is that now I dread switching to overleaf after typst!
Waiting for text-wrapping around images to be supported. https://github.com/typst/typst/issues/5181
Has anyone used Typst for academic conferences/journals?
To me it’s sorta like CSS where the availability of templates is more important than the core language (at least for people lacking design abilities).
Nice! Excited about HTML export. I used LaTeX for autogenerating some semi-legal documents in both PDF and HTML, so all editing happens on Github and Github Actions do the rest for publishing PDFs and updating site. Started using Typst for some of these, but HTML export was a missing piece to completely switch to it.
I started using Typst this year and am really liking it so far. The rendered document updates as you type, and it's easier to code grid layouts. I like how I don't need to be paranoid about adding "%" at the end of lines, lest extra spaces sneak in.
The only downside of typst is that there is no libtypst, which would make it easy to embed.
https://crates.io/crates/typst
That’s a rust library or rather typst code also gets published to crates.io. But it’s not something that can be turned into a libtypst.so/dylib/dll.
You can turn a Rust library into a dynamic library w/ a C ABI - exposing the whole API would be tedious, even with tools like bindgen, but if you just want to provide a "render this char* to PDF" function (or whatever) then it's pretty easy [1].
I know of a few Rust crates that offer something like this - Minijinja, off the top of my head.
[1]: https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code...
Yeah but than I would need to maintain the wrapper lib.
Typst is cool, but sadly (I checked with experts on the discord), there is still no way to simplify legal citations to create a table of authorities; you'd have to mark each one manually somehow, just like in Word. (Every single citation to a case or source in a legal brief might be a different string: the "canonical" citation might appear once in the actual text, or not at all.)
I've been following the HTML export thread, good to see some progress.
I've experimented with 'transpiling' to RST with Pandoc for purposes of digital documentation - but it's not quite there. Would love to see a flavour of Typst that could be viable for digital documentation with a decent live preview experience in VSCode.
I know this isn't the purpose of Typst, but one can hope. Would also welcome advice on this subject of decent authorship digital documentation - some of these frameworks are quite frankly massive, unweildy and painful to deal with.
Is this a LaTeX killer yet?
As long as I don't have to submit a paper, I always use Typst nowadays for PDF generation. So for me that answer is a yes. (I also wrote my PhD thesis in typst and the thesis was accepted.)
Out of curiosity, what was the thesis about? Can you share the PDF?
Predicting dropout in special forces selection.
Yes I (semi) wasted some time to setup a repository including CI: https://thesis.huijzer.xyz/. Link to source code and pdf are on that site. I hope it can satisfy your curiosity :p
Thanks, I’ve read the first part, it’s interesting that there’s no difference between selected candidates and dropouts. Also, pretty nice example of typist :)
It's definitely an excellent example of complex but real typst code. Thanks for sharing!
Probably not for scientific publishing until journals and conferences provide Typst templates as they do with LaTeX. I wish it will happen, to be honest it would be great to get rid of LaTeX. It's old and it shows a lot, a replacement is long overdue.
I've migrated everything I did in LaTeX to Typst. Books (I've written 12 books), invoicing, slides, and handouts. Happy to never touch LaTeX again.
How's the typesetting and justification nowadays? Last time I committed to it for a few months I found the latter to be about the quality of HTML with a better linebreak algorithm.
They implemented the same algorithm that TeX uses.
No, they are not using the same algorithm: https://laurmaedje.github.io/posts/layout-models/
I thought we were talking about justification, there it is using it: https://github.com/typst/typst/discussions/626
If I weren't on mobile I'd link you to the line in the source code. Just search the repo for Knuth-Plass.
I'm aware it uses the same algorithm, but the end result is still worse. Before Typst, I tried typesetting in HTML in an effort to escape LaTeX, and the results I got using an implementation of this same algorithm was very similar to what Typst ended up achieving, which is noticeably worse than LaTeX.
Mind you, I loved programming in Typst, and I wrote some plugins before it got its package manager, but I ended up moving back to LaTeX for this difference in quality of the final output. I should do some in depth testing at some point, because I am looking to switch back.
I'm using it for pretty much all new document generation tasks that are targeted to PDF, and it's very low fuss. Takes under 2 seconds to generate a 1600 page planner PDF with embedded images on many pages. I'd suggest giving it a try, unless you need certain journal templates.
The library of journal templates in the Typst universe is growing day by day. A much bigger issue is some of these journals not yet accepting Typst submissions.
Mostly. The inability to include pdf figures is an annoyance that forces a change in workflow compared to tex. That and needing to submit .tex files for journal publication.
You can include PDF figures with the muchpdf package: https://typst.app/universe/package/muchpdf
From a technical perspective, yes. From a social perspective, maybe. It needs a lot more community support and adoption, but it's on an excellent trajectory.
AFAIK, Typst doesn’t handle multilanguage documents well, and hyphenation in particular. I had to go back to XeTeX because of this.
Totally.
markdown + latex templates + pandoc is the dream combo. no need to learn a new syntax like typst or emacs org-mode.
Plus ad hoc markdown extensions, Lua plugins, ... For me it's Typst.
If it works for you, great. Some people need the features Typst (or LaTex) provides.
Looks wonderful!
The "curve" example is a box
I watched the video presentation going over the new features, and the poor developer looks like he really needs a rest.
I think that was everyone's first thought! It's the first comment on the video too!