Typst – Compose Papers Faster
typst.app
typst.app
Typst looks cool, and I'm probably going to check it out at some point, but a comparison to similar web-based LateX solutions would be more useful than what they have at the moment is all I'm saying.
The compilation speed of LateX doesn't really compare to Typst. With Typst I can work with 3 other students on the same paper, and all of our keystrokes are immediately rendered.
FTR, there are also many people who use LaTeX in a similar way...
(In fact, as I talk through this, I think the solution may just be to abandon the idea that attributes like bold and size are applied directly to text, and instead associate them exclusively with styles. Basically the migration from <b> to <strong> at the dawn of CSS, in WYSIWYG form.)
Ultimately you'd end up with a word processor that's harder to use but easier to use right. And no sales team will greenlight that.
But this entire discussion is predicated on a very prescriptivist viewpoint of the "right" way to use a word processor.
There are various “batteries included” markdown renderers - maybe like quarto - which add mermaid for diagrams and a few other features. But I’ve never seen a paper written in markdown with the same polish as what latex produces. It just doesn’t have the depth of features that you need for making a professional looking paper. Latex ships with all of that out of the box.
If their target market is people writing scientific papers, it makes sense that markdown isn’t in the list. Markdown isn’t a serious competitor.
Markdown is for convenient and quick "good enough" looking text editing. It is very good at what it is supposed to do, but the limitations are quite obvious.
Typst has its focus on editing scientific documents, something that Markdown was just not made for.
Ideally, unrendered markdown still provides a first-class reading experience.
I don't think Typst has that as a design goal.
But it is apples to oranges, you can properly format text to book editor capabilities with typst, while you can only do basic stuff with markdown.
The bottom section especially, which is a list of Typst's shortcomings compared to LaTeX. This helped a lot when actually choosing this over Overleaf for the last writing project I had.
Asciidoc is much much much better.
Just had a quick look at AsciiDoc and it does have some features that look really nice (e.g. the include:: blocks are quite reminiscent of how I structured my LaTeX MSc thesis). And it looks like it similarly has an extension API that would likely fit some of the project management stuff I put together. Neat!
I agree but the issue is that the APIs to do the extension are really really badly documented.
Also it's quite buggy. Things don't compose very well, e.g. if you want to have nested blocks.
Asciidoc is extensible in the same way, but it actually works properly.
Last year I decided to join the 21st century and migrated my tool to be Pandoc and markdown based. I'm still writing code for my toolchain, but now I'm using tools that much more folks are using.
As capable as it is, Latex is just too damn complicated unless you're using someone's carefully maintained template and never trying to deviate, even slightly, from the template. Too many brain cells have been sacrificed to LaTeX. It's time to move on. Hopefully Typst can pull it off.
[1] https://www.user.tu-berlin.de/mhaug/fast-typesetting-increme...
https://www.user.tu-berlin.de/laurmaedje/programmable-markup...
They should not have deviated from the American Mathematical Society notation [1].
Compare the list of supported commands on MathJax [2] or KaTeX [3] and Typst [4].
The main purpose of LaTeX today is to be the de facto standard for scientific and technical mathematical writing.
The issue with these projects is the presumptuous simultaneous breakage of the standard with a poor handpicked mangled subset thereof.
[1] https://ctan.org/tex-archive/macros/latex/required/amsmath
[2] https://docs.mathjax.org/en/latest/input/tex/macros/index.ht...
https://typst.app/docs/reference/symbols/sym/
(And, of course, you can easily define a command for any other Unicode symbol)
Certain formatting stuff like hats above letters etc. is also supported, but for those things that aren't, it's really easy to define them due to Typst being a complete programming language.
why use latex (and this is coming from someone who prefers Word to latex):
- much better tooling than any other format
- much more discussion on various problems you'll hit.
- much more training data for chatgpt and other LLMs, so your personal assistant can help you with latex syntax. good luck getting that level of support for typst or any other new programming language.
- network effect -- if your professor only knows latex, you can't use typst. and professors are slow/reluctant to adopt new shiny tech. if it has worked in the past 50 years, why change it?
Like, if you care at all about how your paper looks, Markdown is insufficient.
I'm in the middle of doing the second edition of Effective Pandas, moving it from rst based tooling to markdown/Pandoc.
And yeah sure many discussions for all kinds of packages and backends except for that one backend or package that you are running.
The network effect aspect is very real, but I've been seeing Typst pop up in my academic circles.
Really I think the main thing holding it back are the lack of templates supported by journals and conferences and some known rendering bugs / limitations that are being worked on.
I think this is fine for workshop submissions without formal proceedings, or a thesis, white paper, etc..
But as soon as formal proceedings are part of the process, you need to fit in with that process.
I think the closest system to typst is Overleaf (I hope they put in their website comparison menu), but the killer feature is that Typst apparently can support local-first that Overleaf does not, and it's wonderful feature for those who are writing a lot even when camping in remote areas (ok I'm stretching a bit there).
Since the Typst's document compiler is open source then it feasible to integrate it with Docusaurus and Tinasaurus (based on TinaCMS). But again there is also Pretext that is open source that can be used as document compiler alternative to Typst [2].
[1]Typst, a new markup-based typesetting system, is now open source:
https://news.ycombinator.com/item?id=35250210
[2] PreTeXt: Write Once, Read Anywhere:
https://pretextbook.org/index.html
[3] PreTeXt: Write Once Read Anywhere Authoring and Publishing System:
I really hope the typst webapp gets git support soon so it at least gets feature parity with Overleaf in this department (issue tracker: https://github.com/typst/webapp-issues/issues/25).
2. Why would we want to observe changes in real time? Do you want this when coding too?
My workflow (that I share with co-authors) is to write everything in Markdown (using Pandoc to get PDF output). When we are almost finished, we export (again with Pandoc) to LaTeX.
We collaborate on Git, because, just as when programming, I don't want my co-authors to witness my crappy thought process. That's just noise. Git allows us to use different Git-branches for the arxiv version, the conference version, and the journal version. We also use tags to indicate different submissions.
I‘m not an Typst author, but I don’t get your point. How are you going to specify a 2 column outlay, for example? Markdown is not very expressive. You can always compile (less expressive) Markdown to Typst.
2. Why would we want to observe changes in real time? Do you want this when coding too?
You prefer to debug by looking at the code only?
2. I see that I wasn't completely clear. I meant: why do we want to see our collaborators' changes in real time? To me, that would be very disturbing.
It's definitely only a problem for some people, and might even be specific to some aspect of the google docs implementation, I don't know yet. But yeah, that feature is not the slam dunk it sounds like, and you might not realize it until you're in the middle of it.
2: it is fundamentally a command line app that converts a .tex file to a pdf (and some other output formats). You can just git over that if you prefer it. The web editor is a separate application, which is very streamlined and a good option for students working together, but sure, feel free to use something else.
Their math syntax is already a common Markdown extension but they seem to be more or less compatible in the framing although the actual match language is new which seems fine. Then of course they add on their macros.
So I guess the point is why diverge where not necessary. Not why diverge at all.
That's your (and my) workflow. However, there is clearly demand for a collaborative workflow, as demonstrated by Overleaf and ShareLaTeX before that.
There's already a pandoc conversion to Typst and the syntax is mostly similar. Various symbols that are in use in markdown is used by the Typst in some other places (e.g. # is used for designating code mode in content mode so you can use variables function in-text).
> 2. Why would we want to observe changes in real time? Do you want this when coding too?
If you've ever wanted to just use something that's more powerful than Markdown (and not use awkward HTML in between, let's face it MD was supposed to be minimal), you have to use LaTeX, but it gets painfully slow as the project gets big. Fast feedback loops are essential. Would you rather wait 5s seconds to see that you have made changes that destroyed your layout or in an instant with incremental compilation?
3. You can collaborate with Git (and on the Web App) because Typst is also a language and a compiler (see their GitHub page at https://github.com/typst/typst) like LaTeX.
You can have it function as well as Markdown with templates and just use the sugar syntax (plus custom functions ad hoc without having to wrangle with LaTeX's enigmatic errors [1] and confusing macros even for something trivial like fonts [2]).
[1]: remember \badness 10000?
[2]: You'd have to install a package even though the OTF/TTF of the font you want is already installed on your system. And don't even mention how it's a completely different setup for PDFLaTeX, ConTeXT, and LuaLaTeX to use fonts. This is assuming you want to use LaTeX templates with markdown using Pandoc or Quarto. sigh...
At least good for our own papers though.
There's a workaround, though.
how is -> and 00 modern when → and ∞ exist?
I couldn't find Tauri in there, any idea what they used for the "frontend"? (I don't know the Rust eco-system that well and there are a ton of packages).
Wow, that's really appealing to me; thanks for pointing that out. I was thinking "well, this looks nicer than LaTeX, and I'm really frustrated with LaTeX, but I really don't want to jump right into a big WYSIWYG thing". Now I'm really interested. Most of the other "replacements" suffer in some big ways (Markdown and RST/Sphinx are great for structured content, but not great for meticulous control over the presentation).
$ cargo install --git https://github.com/typst/typst
...
$ printf 'Total displaced soil by glacial flow:\n\n$ 7.32 beta +\n sum_(i=0)^nabla Q_i / 2 $\n' > file.typ
$ typst compile file.typ output.pdf
And I've got a cool rendered PDF with a math formula!
I'm very keen now to see exactly how flexible, robust, and extensible this is. LaTeX can do basically anything, but you pay for the power in blood. I would love a typesetting system that isn't horribly painful to extend.
Their discord channel has a bunch of community plugins if you want a showcase. It’s not yet as big as latex, obviously, but I think it already has the critical mass to make it a sound choice.
Will never touch Latex again, so much inconsisteny, so much pain. Let alone doing (and memorizing) simple things like page setup and setting the font size to the point. In Typst it's just simple and efficient, and I even don't need to explain anything of the following code (except maybe "leading" which is spacing between lines, "tracking" is space between characters, "spacing" is space bewteen words):
#set page( paper: "a4", margin: (x: 2.0cm, y: 2.5cm) )
#set text( font: "Noto Sans", size: 4em, weight: "regular", fill: black, tracking: 0.2pt, spacing: 115% )
#set par( justify: false, leading: 1.75em, )
See all options... https://typst.app/docs/reference/text/text/ https://typst.app/docs/reference/layout/page/ https://typst.app/docs/reference/layout/par/
The documentation is very thorough and kind of.. flawless.
The two theses of the founders (linked in thread, search tu-berlin.de) are an interesting read and show how they resolved the complexity of typography into simplicity and efficiency.
Using plugins is easy (you can write you own too), just add a line (e.g. #import "@preview/codetastic:0.2.2"), it will download the plugin when compiling (you can also clone the git repo and reference it locally).
Try to compile to pdf:
#import "@preview/codetastic:0.2.2" #box(codetastic.qrcode("https://news.ycombinator.com/item?id=38354422"))
typst compile filename.typ
The plugins repository (https://typst.app/docs/packages/) is filling rapidly and has already some cool ones like codelst (show codeblocks, highlight lines and reference them), codetastic (generate ean + qr-codes) and showybox (beautiful boxes whose style can be stremalined across a whole document easily). And they only started going public early this year... Not to say that the language itself isn't super powerful but you can literally program qr-code-generation in typst (which is what the plugin author did).
Beautiful... #box(fill: gradient.linear(..color.map.rainbow))[Typst rocks.]
Matthew Butterick who created Pollen approves too: https://forums.matthewbutterick.com/t/typst-another-typesett...