And Beamer sldies. Looks like there’s already a Typst package for presentations: Polylux.
Actually, I think the most full-featured is touying - polylux has the basics for sure, but isn’t being super actively developed. Touying took some inspiration from it, but is being constantly improved, has more support for things like animation using Cetz (the tikz-like package) and pinit (the one I linked earlier).
For what it’s worth, I’ve written several papers using LaTeX and Git for synchronizing with collaborators. However, my field is computer science, so it wasn’t nearly as big a lift for us as it would be for many others. We were already familiar with Git for software collaboration, making it an easy and obvious choice when writing our documents.
Indeed, that’s what they do. Unfortunately, a lot of times this “conversion” is imperfect, introduces a lot of typos, and requires a lot of manual intervention and editing.
Usually, this comes at a point in the paper’s lifecycle when I have seen every equation 500 times, and no longer notice what’s on the screen/paper. It could be dancing pink elephants, and I would mark it correct with a 90% probability.
I think the the authors should choose the tools they are most comfortable with while working on the paper, and not care about the journal’s preferences as long as PDF is accepted (it usually is, at least for submission). Because of this, I don’t see a problem with adapting Typst.
I recently finished writing my thesis (in which I used Julia almost exclusively) in Typst, and the experience has been extremely positive overall. The documentation is great. I only used 2 extra packages (to have table of contents for each chapter and a glossary) and everything worked perfectly. My supervisor was able to proofread and comment in their web interface.
I only had a problem at the very end, as Typst 0.11 wouldn’t let me export to PDF/A format. This problem was (more or less) solved with Typst 0.12.
I’ve switched to Typst for my lecture notes and slides and it’s been a smooth and pleasant experience. The markup is a nicer, more powerful Markdown. The math syntax is so nice I just scroll my source files when I’m bored or tired and marvel at the readability of the math. I mean instead of \frac{3}{2} \in \mathbb{Q}
I can write 3/2 in QQ
(it shines even more in more complex examples). The scripting language is the bee’s knees. For example I love that functions are pure in Typst: they cannot have any side effect. In practice this means there’s a smaller chance of conflict between packages because package A cannot change the meaning of a function used by package B. And the whole thing is a single static executable (40MB) with zero dependency! It’s a dream?
Some more specific experiences:
-
With the context/state/query system it was easy to write an exam template that retrieves the points of each question to typeset a grading table.
-
I made a few diagrams with CeTZ, and I’d say it’s certainly not as mature as TikZ, but having a good scripting language makes it easy to extend where it’s lacking.
But let’s also mention some annoying parts:
-
You cannot include PDF files. You have to convert them to SVG, or ideally produce SVGs in the first place. It didn’t really hurt me because I was already making SVGs of all figures for the Web version of my lecture notes.
-
No HTML output (though it’s the main focus of development now).
-
For tricky typesetting/layout, there’s often a solution based on nesting things inside of boxes (for example to put aligned equations as one part of a larger formula) but no simple way to align baselines correctly without manual tuning.
Anyway I enjoy much more working on lecture notes and exams now… I just need to convince my colleagues to switch
I would really love to see this - any examples that you can share?
I put a simple example here: Typst exam · GitHub
Compile test.typ
normally to see the exam handed out to students, and then with typst c test.typ --input solution=true
to see the solution version. You can uncomment show-question: true
in test.typ
to make a solution that includes the question text.
This template uses states for the number of questions and the list of points. I think a more elegant approach might be to add an invisible metadata element in each question, all with the same label, e.g. #metadata(points)<exam-question>
. Then to make the grading table on the title page, I could simply use context query(<exam-question>).map(x => x.value)
to get an array of points, and I could put additional things in the metadata such as the full text of the questions and answers (though I’m not sure what I would do with it).
I also switched to typst for my thesis and I was a smooth experience (except for an upgrade that « broke » long citations).
The syntax really sold me, as other said, but the online editor sold my director At that time, comments were not available and a hard limit on the number of files meant I could not have the whole manuscript with picture. The new, paid, version seems to have fixed that (not tested yet)
Touting for slides can export to HTML so that what I went for last time I had to create slides (last week actually).
I use Pandoc, which literally offers what you describe, as I can write in Markdown and it uses actual LaTeX to generate PDFs. I can extend the Markdown syntax as needed by writing hooks. The same source can create LaTeX code, PDF, docx, HTML, …
I think this is where the analogy breaks down. Markdown is great for a lot of stuff, but its syntax is quite limited. What do you need to do if things get moderately complicated?
I confess I don’t know what hooks do, but I presume you need to tell pandoc how to translate things into latex, which means you’re writing latex. Do I have that wrong?
Aside from nice syntax, Typst has a proper scripting language embedded, with an elegant design centered on powerful show
and set
rules. Combine this with instant live typesetting, and I’m sold.
Negative comment here. I tried Typst at a very early stage (April 2023). I would go through the reasons why I don’t use it, based on experiencing the early-stage product. I’d be excited if some of them have been solved.
The commands for most special characters are different from LaTeX and they even had set up a table for that. I asked the developer why the commands were different and they said they intended to do that. I’m strongly against the idea. The advantage of Typst is not math formula at all. LaTeX has a lot of inconveniences and math formula is not one of them. Creating a barrier intentionally without gaining anything (a shorter string doesn’t make it easier to use or make) is an evil act.
The ability of scripting sounds very nice. However, there is no situation where it is a killer. For anything related to a production-grade, the codes are written in a serious programming language and the graphical results are produced accordingly. On a second thought, modern HTML with javascript can do everything Typst does. What would be a killer, that I can imagine, is to call an external script in other languages and use their results, just like Jupyter Notebook.
I have been writing documents with LaTeX, markdown and MSOffice, and haven’t had a situation where Typst would be better than all of them. The experience with LaTeX has been smoother and smoother thanks to the development of AI, which is unfortunately faster than the development of Typst. Even if you are not familiar with LaTeX or HTML, you can still achieve common goals with the help of GPT. There are a few webapps where you can feed an image and get the LaTeX codes.
I haven’t tried the CeTZ thing, and it’s definitely interesting. In terms of drawing diagrams, TikZ is not usable for anything with complexity. The example showcased by @DrPapa is one of the very few cases where TikZ is good at, though. Anyway, Manim is still more attractive atm.
While I have very little stake in this part (I almost never need math in what I’m writing), if you read through some of the responses from eg @ExpandingMan you’ll see that the new math syntax is a huge selling point, as it reduces line noise. So calling it evil is, I think, a bit extreme. At least some people in a position to know are very happy with the change.
I can certainly understand if you’re super comfortable with LaTeX already, and AI fills in the gaps, there would be a high barrier to switching. And that’s fine. But I can do things with typst that I would never even attempt with LaTeX - it’s a huge win for me.
I don’t believe you can get LaTeX-like linebreaks from html/javascript or Word. It’s tough to beat the layout quality from LaTeX (or Typst which uses similar algorithm).
Part of the selling point to me is that it is a new system entirely, rather than building on LaTeX. I want their design decisions to be motivated by what is known to be effective, in LaTeX or otherwise, rather than choosing a design just because LaTeX does it in a certain way.
Plugins and queries enable packages like TypstJlyfish.jl, where Julia values are embedded within the document using Julia’s show
system.
TBH I used to find the look produced by the Knuth–Plass algorithm annoying. It’s fine as long as I don’t look at the words too closely, but the varying spacing between words used to annoy me.
In a comparison between Typst and LaTeX, another thing to consider is the development speed and quality.
We Julians like both the development speed and performance speed when implementing projects in Julia. In 12+ years we’ve managed to rival and even surpass the performance and user experience of other ecosystems that have had 20+ years to hone their craft.
Typst has demonstrated that kind of progress as well, heck it’s already much faster that LaTeX in many cases such as compiling our Julia docs, and new user entry level is much easier. For the same reason I choose Julia for its potential over Python, MATLAB, C++, etc., I prefer Typst for its potential over LaTeX and any TeX derivatives.
That said, like many have pointed out, it’s not yet featured enough to cover many use cases. I sometimes still work with Pluto.jl or MarkDown files over Typst depending on what I need for my task.
Several years ago I attempted to learn LaTeX and was immediately frustrated and confused. Learning the basics of Typst was both fun and easy, which felt deeply relieving.
I completely agree!
Even though Typst has a long way to go it’s clear that it’s a viable contender just by it’s rapidly growing user base. This isn’t Golang where or Swift where a massive corporation willed the language into popularity, these are ~35k users who tried it out and loved it enough to give it a GitHub star (in a year and a half, compared to Julia at ~46k). That gives a lot of confidence that it’s worth investing time in and that the ecosystem will grow.
Recently, I’m writing a document (with programs and maths) by HTML (React/Vue/Svelte + MathML + SVG + something). TeX was created for documents and WEB was created for literate programming (document + program). HTML + JavaScript was for document + program but now for any (possibly Web) GUI cross-platform applications. I think HTML + JavaScript based application is more expressive than literate programming. Therefore I’m writing in HTML.
However, obviously, LaTeX is good at math things and PostScript or PDF output in current situation than any Web (HTML + JS + MathML + SVG + something) apps. We need more powerful practical software written in Web tech. I didn’t know Typst. I’ll investigate it.
I give two documentation softwares they are worth a look: