optionalsquid
21 hours ago
There's usually some confusion about this, so to clarify in advance:
- The Typst online editor is proprietary: https://typst.app
- The Typst compiler/CLI is open source: https://github.com/typst/typst
I hear that the online editor is quite good, but personally I've only ever used the CLI.
I originally picked up Typst as yet another replacement for PowerPoint (replacing my use of Marp), but have since used it for a poster and some minor text documents. And I've been very happy the results. I know that a lot of people love using LaTeX for that kind of thing, and with good reasons, but I always forgot most of the details between my (occasional) use of LaTeX, while I've found Typst to be very easy to return to
agentcoops
19 hours ago
I used LaTeX for decades and had convinced myself nothing could ever replace it. Just this month, however, I converted to Typst for a large project. Absolutely no regrets: undying respect to the great Knuth, but the experience with Typst is already simply better on almost every axis. I use TinyMist with vscode and the development experience is terrific. I was modifying templates within a day of picking it up, which—-skill issue undoubtedly—-always gave me nightmares in LaTeX.
bobbylarrybobby
19 hours ago
100% agree. With tex it feels like when you use a package or template, you're stuck with every choice it made because changing it yourself is just too daunting. With Typst I feel confident that I can go in and muck with whatever I don't like. It's a really refreshing feeling.
WillAdams
18 hours ago
The two applications were developed on quite different computers and with quite different toolchains.
Interestingly, Knuth has stated that his development of Literate Programming:
http://literateprogramming.com/
was more important than TeX --- fortunately, his publishing _TeX: The Program_:
https://www.goodreads.com/book/show/499934.Computers_Typeset...
has been very helpful to folks developing successors and add-ons and new versions, facilitating the creation of web2c and change files which made tools such as pdftex and omega and xetex and luatex possible).
evertedsphere
18 hours ago
famously knuth was trying to (and pretty much did) solve digital typesetting not create a nice piece of hci so this is all as it should be or at least as might be expected
agentcoops
14 hours ago
Staying in his lane, living his best life—dropping incredible things to humanity ever now and then. I had to check since I hadn’t thought about it for… a decade apparently, but looks like TAOCP 4B came out a couple years ago.
imiric
19 hours ago
Speaking of skill, learning a new language is always daunting, but I found that LLMs do a pretty good job of generating Typst code. I relied on that a lot for generating snippets of code, and learning about the language, which would've taken me more time otherwise. Although the Typst docs are pretty good, regardless.
nonethewiser
16 hours ago
What LLMs? In my experience they do a terrible job with Typst. Very frequently ChatGPT and Gemini will produce code that doesnt work. Im not sure if it's using an older syntax or just hallucinating. Additionally, it's rarely able to fix it after I provide the error and even copy-past docs.
Maybe I was just unlucky or you had better luck with another model. But I was very surprised to here this because Typst is my chief example for a language that LLMs are bad at.
vrotaru
5 hours ago
Here is my experience.
Claude did generated a rather good template for what I needed. It did not compile at first but I copy-pasted the errors and it fixed them.
Not all was good, though. It used literal bullets instead of `-` required for lists, but on whole the experience was positive.
It had taken me less time to fix the template than it would been taken to write it from scratch.
Something which Claude was good at. I throw him a crude ASCII "art" representation of what I want and get the right Typst code back.
imiric
15 hours ago
This was a few months ago, but mainly Claude Sonnet 3.5 IIRC.
You can't escape hallucinations, of course, but they can be mitigated somewhat. Don't ask it to generate a bunch of code at once. Feed it a snippet of code, and tell it precisely what you want it to do. These are general LLM rules applicable to any language and project, and I've had success with them with Typst. I also used it just to get explanations, or general ideas about how to do something, and then figure out the actual syntax and working code myself. It's strange that you haven't had luck with pasting docs. That has usually worked well for me.
I also think that LLMs don't struggle as much with Typst because the language is relatively simple, and there is little bad and outdated content about it online, so they weren't trained on it. I assume that the API probably hasn't changed as much either and there haven't been many compatibility issues, so it's not as important which version the LLM was trained on.
nonethewiser
14 hours ago
It failed miserably with very simple requests. It was wrong but it wasn't clear if it was hallucinating or simply using old syntax.
I did not try Claude though. Perhaps that performs better.
edit: I just prompted chatGPT with this and pasted the result into the Typst editor. 20 compile errors.
>Make a Typst doc with two columns per page and US page dimensions
Same prompt but for Latex and pasted in overleaf. No problems.
bluenose69
an hour ago
I just tried the same prompt in chatGPT and it gave 10 errors. Mostly they were because it was using `#` as a comment character, which suggests that it has not been given very much typst code to examine.
busyant
13 hours ago
> but I found that LLMs do a pretty good job of generating Typst code.
Interestingly, I've had the opposite experience. ChatGPT and Claude repeatedly gave me errors, apologized profusely, and then said, "ah, I had the wrong keyword. It's actually <blahblah>"--and that would simply give me another error and a subsequent apology.
At least Gemini had the good taste of telling me that it didn't know how to do what I wanted with typst.
It's certainly possible that I was trying to do something a little too unusual (who knows), but I chalked it up to the LLMs not having a large enough corpus of training text.
On the bright side, the typst documentation is quite good and it was just a matter of adjusting example code that got me on track.
imiric
3 hours ago
Well, that just goes to show that these tools are wildly unpredictable. I've had bad experiences generating Go, whereas I've read many experiences of the opposite.
> I chalked it up to the LLMs not having a large enough corpus of training text.
I'm inclined to believe the opposite, actually. It's not so much about the size of the training data, but the quality of it. Garbage in, garbage out. Typst is still very young, and there's not much bad code in the wild.
And the language itself plays a large role. A simple language with less esoteric syntax and features should be easier to train on and generate than something more complex. This is why I think LLMs are notoriously bad at generating Rust code. There's plenty of it to train on, but Rust is a deep pit of complexity and unusual syntax. Though it helps when the language is strict and statically typed, so that the compiler can catch issues early. I would dread relying on generated Python code, despite of how popular and simple it is on the surface.
commandersaki
17 hours ago
Yep this is how I started my Typst journey. I was intimidated by Typst at first and wanted to do some mildly complicated documents that really isn't covered by the tutorial, so I had ChatGPT generate elements of the document I need. Now I'm a more self-sufficient being able to generate functions and use more complicated features of Typst and better exercise use of the docs.
jadodev
21 hours ago
TinyMist is a great alternative to the online editor for local development in VS Code / Cursor https://myriad-dreamin.github.io/tinymist/
optionalsquid
21 hours ago
Yeah, that's also what I've been using, and yes it is very good. Thank you for bringing it up
__mharrison__
13 hours ago
Converted to Typst last year from LaTeX for book authoring, invoices, and slides (was using a hand-rolled rst2ppt tool for slides). Happy to never touch LaTeX again. Typst is that good.
jadbox
16 hours ago
I LOVE Marp! Why do you like Typst more than Marp for presentations?
optionalsquid
13 hours ago
I much preferred Marp to PowerPoint, but there were several parts of it I wasn't fond of:
- Using CSS for formatting resulted in a lot of one-off rules, and was a lot noisier and less readable than the equivalent in Typst.
- The use of CSS for formatting also meant that the Marp compiler couldn't catch most of my silly mistakes. With Typst the compiler will catch those mistakes.
- Using a plugin to selectively highlight lines required writing a custom "engine" in JS, which was a pain to get working. Using a package in Typst is extremely simple.
- And I had to use npm to install the plugin in the first place. Typst comes with a package manager built-in.
- Generating PDFs required that I installed Chrome/Chromium. Typst does that out of the box.
The only place, that I can think of, where Marp is ahead of Typst, is with regards to generating HTML based presentations. But that probably won't be the case forever, and I personally always use PDFs for the final presentation, since that means that a lot less can go wrong. Especially so if I am not using my own PC when giving the presentation
imiric
19 hours ago
This is a great example of the open core model done right. Have a fully-featured F/LOSS product, and build value-add commercial products and services on top of it.
I've also only used the CLI tool, and didn't miss any features from it. The commercial product was never pushed or promoted to me. I personally have no need for it, and I'm only vaguely aware that it exists. But I'm sure that people who do need the friendlier UI/UX and more advanced features would be willing to pay for it, so I'm glad that the team has a stable source of income that enables them to continue maintaining the project in the long-term.
Looking at the pricing page now... Wow, the plans are quite generous and affordable. Way to go!
commandersaki
17 hours ago
I don't really need the web version, but I pay for a yearly subscription to support development of Typst.
I do find the web version handy to share Typst examples and on occasion work on a document while syncing with private Github repository.
croes
19 hours ago
It’s a great example how many open source projects start … until they change.
imiric
16 hours ago
I mean, we can be cynical about it, or we can acknowledge the fact that running a sustainable business around OSS is entrepreneurship on hard mode.
Yes, many companies start with good intentions which then change at some point, but there have also been companies that have managed to successfully balance both sides.
Grafana comes to mind, as well as ClickHouse, and TimescaleDB. I'm not as familiar with the latter two, but Grafana is certainly a good example. You can probably find some blemishes even on their record, but overall, I would say they have been excellent stewards of OSS. Especially considering the large amount of products they maintain.
So far, Typst seem to be on the right track as well, which is worthy of praise.
s777
18 hours ago
The online editor is extremely useful for quick projects with other people where real-time editing works better than git, and where people don't want to download tools.
culi
15 hours ago
isitreallyfoss.com did a break down on typst that goes more in-depth
https://isitreallyfoss.com/projects/typst/
It seems mostly fine except for this bit:
> The compiler includes a package manager “Typst Universe” that may connect to servers owned and operated by Typst GmbH
weinzierl
18 hours ago
Speaking of core product and online editor: Over the decades many of the products I worked on developed some form of reporting feature.
Not alway, but often they required PDF output. Not always, but often they ended up being LaTeX based, with all the nice and some of the ugly consequences. Especially the security story was never great.
Does anyone know how hard it would be to integrate the Typst renderer into an existing Rust product?
tugten
16 hours ago
I embed the typst binary in a go binary deployed to cloud run. I use this to generate pdfs on the fly.
I need to generate a 2 page invoice and i can generate it under 100 ms. IIRC, it's easier to integrate with rust. Since the pdf rendered is written in rust
lonjil
12 hours ago
Not particularly difficult. The main Typst crate should have you covered. I've seen quite a lot of projects that do it already.
paradox460
9 hours ago
Did you ever use beamer? I've done a few presentations with it, and while I wouldn't call it great, I preferred it to PowerPoint or keynote
dev_l1x_be
15 hours ago
How do you translate a bit more visually complex presentation to Typst? Should I create my iconography in SVG and try to position those?
optionalsquid
13 hours ago
What do you mean by a "more visually complex presentation"? Typst has some built in support for drawing shapes [1], but if you need more complex figures then cetz is also an option [2].
But if you mean animations (including animated transitions), then I do not believe that it is possible in Typst, since the output it outputs PDFs. I also do not believe that it is possible to embed multimedia in a document.
setopt
16 hours ago
> I originally picked up Typst as yet another replacement for PowerPoint
I’ve also mainly used it for slides so far. Can recommend Slydst for that.
optionalsquid
13 hours ago
I've been using touying so far. It took some effort, since I was learning Typst at the same time, but I was able to convert our "official" PowerPoint template to a toying template that I am quite happy with.
From what I can tell, Slydst seems intended for more minimalist slides. But it looks nice, so I'll have to keep it in mind for cases where I don't need the above template