I like the "Why should I use Typst instead of ..." section on the webpage. Tells me immediately what I want to know. More websites should have this.
I‘ve been using Typst in production to generate a PDF on the fly and it has been amazing. Much smaller dependencies than LaTeX and it was also extremely fast. The syntax takes a bit of getting used to but compared to LaTeX I can’t complain. It looks like a powerful syntax.
I would recommend testing Markdown and Pandoc. It's open source, and it can export to pdf (via latex), html, latex, doc(x), odt, rst, wiki, ...
The upcoming 1.4 release of quarto is going to have support for Typst as an output format (https://quarto.org/docs/prerelease/1.4/typst.html).
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.
Thanks. Good to know. I've been learning quarto for the past 3 weeks and I'm amazed how flexible it is. Knowing it'll support typst makes it even flexibler.
Yes, Quarto with Typst for typesetting is how I plan to try and transition things to over time. Every new project, whether I'm just writing something up, creating a short presentation, or doing a data analysis, everything starts as a Quarto project now.
I needed a pretty PDF with headers and footers. Markdown was not expressive enough.
As of late I’ve been using restructuredtext and rst2latex.py and have been quite happy with it. I’m quite used to LaTeX for writing equations and RST handles most of the other boilerplate. If you do need to do fancy TeX things you can still just drop that inline and it generally works pretty good.
Interesting! I picked it up because of Sphinx primarily. The ability to extend it to pretty easily and cleanly add things like project management blocks is awesome. The Emacs ReST mode generally works pretty good. The only thing that kind of tripped me up was the indentation rules around bullet points.
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 wrote many physical books in rst. (see rst2nitrile).
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.
I use obsidian-md to convert Markdown to nice PDFs.
For me, I use Emacs org-mode's latex export. It works pretty well plus I use org-mode for other stuff anyway.
For me, getting Latex out of the dependency chain is a huge attraction. Just too much cruft and slowness and mysterious errors. Seems way too outdated today. I hope something like typst can provide a nice, fast and modern pdf generator backend. My understanding is that pandoc already supports typst.
Pandoc also supports typst https://github.com/typst/typst/issues/127
For what it's worth, you can move Markdown -> Typst by way of Pandoc.
Pandoc can export to typst and pdf via typst since, I think, 3.0 version.
Do you know how it costs? I can't find this information on the website.
Their github [1] page is more helpful for this. Typst itself (as in the program that converts your input to a PDF) is free and open source under the Apache license, and the online editor is free as well but it's currently in a public beta so that could change in the future once they move that out of the beta.
Thank you!
Which text editor are you using? I would like to try Typst locally.
You can use vscode and install typst-lsp and typst preivew extension.
This was built initially by two PhD students in Germany if I remember correctly, they then spun it off into a company. Super impressive given how difficult typesetting is. And it's written in Rust as well!
I believe they were masters students not PhD students.
Yep, Martin Haug wrote his Master's thesis [1] about it.
[1] https://www.user.tu-berlin.de/mhaug/fast-typesetting-increme...
Laurenz Mädje (the other founder) did too:
https://www.user.tu-berlin.de/laurmaedje/programmable-markup...
> Say goodbye to fidgety formula editors and antiquated syntax.
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...
KaTeX and MathJax documentations mostly list mathematical symbols instead of actual typesetting commands. Typst supports symbols as well, they just aren't considered to be "math commands", so obviously they aren't on the "math commands" page of the documentation.
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.
Typst is a programmable language, where math mode is just syntactic sugar. It can be extended as necessary.
I'm afraid the ship has sailed and people will use latex for ever (I personally use Word but with lots of customizations).
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?
I mean by that logic we should still be using FORTRAN for our research code and there’s no point developing new languages because the space is explored at this point.
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 the main blocking point is that TeX algorithms are near optimal for a lot of the technical typesetting and everything else looks somewhat off to the astute readers, and those readers are repeat consumers of the technical texts.
It's not as though the TeX algorithms are secret and can't possibly be recreated elsewhere.
Absolutely. There simply hasn’t been a better/faster implementation outside the existing TeX ecosystem so far. Returning to the comment that I replied to: everybody could rewrite/extend Fortran; it will still be Fortran.
Just for the record, FORTRAN is #12 on tiobe [1], leaving go and swift behind.
TIOBE is still behind useless. It once listed Visual Basic ahead of JS. It has as much relevance to sorting programming languages as alphabetical ordering.
You can get really far today with Pandoc Markdown, which has many benefits over LaTeX. So, just wait until a generation has grown up with Markdown as a universal text language. Indeed, with the exception of the journal's template, you can write a full paper in Pandoc Markdown and nobody would spot the difference.
I tried md for a while but inevitably ended up having to incorporate latex in the document for formatting (either through md or pandoc). at that point, you might as well use latex.
tbqh, any serious paper writing requires formatting considerations that Markdown cannot express.
Like, if you care at all about how your paper looks, Markdown is insufficient.
I think with pandoc there's very little you can't do, but I never tested it to its limits. Nowadays I only use LaTeX if I really need the nitty gritty formatting capabilities, at which point adding an extra layer of indirection is pointless.
Can you link a scientific article or book pdf that was written in Markdown?
The PDFs of my recent books, Effective XGBoost, and Learning Python for Data were created using markdown and Pandoc (somewhere along the way).
I'm in the middle of doing the second edition of Effective Pandas, moving it from rst based tooling to markdown/Pandoc.
You can get quite far... but really if you're writing a big technical document with a Markdown style format you definitely want Asciidoc, not Markdown.
I’m not affiliated to Typst and still think LaTeX at this point in time is one of the worst things to deal with as an academic. Errors can be extremely unclear.
And yeah sure many discussions for all kinds of packages and backends except for that one backend or package that you are running.
Completely with you. It’s time to move on from Latex. Couldn’t hope more for the success of a better alternative!
This so much. LaTex syntax is not that bad, but there are so many layers of templates that Tex errors are cryptic at best.
tbqh IME using Copilot for LaTeX has been pretty hit or miss, so I'm not sure the AI point is as pertinent.
The network effect aspect is very real, but I've been seeing Typst pop up in my academic circles.
I think points 2 and 3 only really apply if we assume the number of problems encountered with LaTeX and Typst are roughly similar. After all, how much of an issue is finding solutions if you never run into issues in the first place? And this is where I think competing platforms can pull ahead of LaTeX - it's already a huge pain to learn and use, so if a new standard becomes much more convenient.. why not switch?
Yeah, the LaTeX ship has sailed, I'll never touch it again. I'm very happy that I can use Typst instead.
The problem with having such a technology not being based on latex: every conference in my field (computer science) with formal proceedings needs you to send your latex sources to compile the proceedings.
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.
Thesevm processes don't need to be immutable, they could evolve to accept both eventually. LaTeX has had its time, it's good to see competition even though it may not be as mature yet.
Good luck trying to convince a large group of maths professors to change the way they are doing things.
These math professors are going to be replaced by younger math professors eventually which may know and like Typst more than LaTeX.
This is one the most recent posts on Typst with 159 comments [1]. Why it is not appear on HN past when checked just baffled me, perhaps Dang or someone as can explain.
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:
The local-first version of Overleaf is just LaTeX, or am I missing something?
Maybe OP means the collaboration feature. I don't know whether local typst supports that though. Expecting online collaboration in "local first" may be an oxymoron in itself...
The pro version of Overleaf supports offline work with a simple trick: every Overleaf document can be accessed as a git repo. It's a bit limited (there's no branches or tags, and it breaks the "track changes" feature) and trying to convince the average researcher to learn git is a challenge, but if you know git it works quite well.
There's also the fact that you can't auth using pub keys, and are consequently stuck using password auth (as a workaround, I usually just set the credential cache expiration to some huge value). Despite this, it's only half-annoying, but again, as you pointed out, only if one of your collaborators happens to have the premium version.
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).
As far as I know, local Typst does not support collaboration. At least not in the way the online version and Overleaf do.
Typst could be to LaTeX what Python was to Perl.
Or what Word was to WordPerfect.
You mean worst but successful 'cause of harsh marketing?
I love everything about Typst except for the math-mode syntax. I'm too used to LaTeX syntax for math (my editor of choice uses MathJAX to render math and math only). Any chance of substituting in the math syntax (even if it's the new rendering engine?)
1. Why not use Markdown-compatible syntax?
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.
1. Why not use Markdown-compatible syntax?
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?
1. Using `classoption: twocolumn`
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.
So your 1. is no longer markdown everyone knows, but an ad hoc, badly documented new language understandable by a tiny subset of editors/people. How is that better?
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.
Yeah, collaborating in real time on the same document is pretty neat (from using google docs for this.) Having someone else typing on the same page got an unexpectedly visceral "argh! it's moving! get it off of me" reaction the first couple of times I tried it, had to switch tabs and come back later.
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.
I'm with you. Git with one sentence per line is generally my preferred workflow for markdown, asciidoc, etc.
It seems that it would have been good to be basically extensions on markdown. For example why use = for headers rather than the established #. + For numbered lists is arguably an improvement on 1. But maybe they could support both. It seems like these are pointless differences.
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.
> 1. Why not use Markdown-compatible syntax?
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...
> 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.
That's your (and my) workflow. However, there is clearly demand for a collaborative workflow, as demonstrated by Overleaf and ShareLaTeX before that.
You can still use git with typst, if you use the offline (open-source) compiler instead of the web app.
Thanks for sharing your workflow! I've long wanted to adapt something similar, but it is difficult to get away from Word - especially because the comment and revision functions in Word are more straightforward than git-based solutions
This is very good. Unfortunately, (majority of) journals and conferences will probably never use it.
At least good for our own papers though.
LaTeX was great for its time but it should have died long ago. Typst is such a pleasure to use in comparison. It's unfortunately not quite capable enough yet to use for my papers, but I very much hope that it finds success in the future.
It's still fresh (like a warm apple pie). Though, I'm astounded how much depth is already in there.
Time to rewrite my resume using this. If anyone knows any similar tools, please share them.
Check out the awesome-typst [0] list as well for ideas.
Should use Typst, it's really the best out there at the moment.
As I've just written on Lemmy, Typst is so good that I've donated a couple of times. The one dealbreaker for me, though, is the current lack of locale-aware decimal separators: https://github.com/typst/typst/issues/1093
There's a workaround, though.
> Say goodbye to fidgety formula editors and antiquated syntax. > lim_(x->oo) 1/x = 0
how is -> and 00 modern when → and ∞ exist?
Nobody knows where to find these glyphs on the keyboard.
True, I have shortcuts for it instead
Those are supported, too.
I tested it two months ago and I was really impressed: clear, fast and good rendering. I even managed to modify a module for message boxes in 15mn. I haven't used latex in 10 years, but I would have replaced it with typst everywhere I could. I still hope it could also replace markdown
This is impressive, and in Rust and open source Apache license! Nice!
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).
Instead of comparing to LaTeX format, it should compare to ConTeXt…
This is very cool. What's the pricing you anticipate?
The compiler is open source, and written in rust. The web interface is free, and I think it will stay that way? (I think they run on donations). They could really use some clearer marketing on the front page...
> The compiler is open source, and written in rust.
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.
I think they were very careful to have the same expressivity as latex. It’s basically a whole language with a human-friendly syntax.
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.
The idea is to have an opensource compiler (to avoid lock in) and a paid IDE-style tool.
I'm a big fan.
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...
Is there something like TikZ for Typst?
As per https://github.com/qjcg/awesome-typst#graphics there is CeTZ. Of course it is not as full-fledged as TikZ, but it works pretty well.
Looks nice for resumes also.
I did my last resume in Typst and it was so much better than a Word/Google doc or Latex.
Am I the only person that wrote my thesis in Maple?
Can typst also compile to HTML like markdown?
Conspicuously missing a comparison to Overleaf, arguably the most similar in nature to what this is trying to achieve. Cool project, nevertheless.
Could you clarify what you mean? They explicitly compare against LaTeX, on which Overleaf is built, and I don't see any points in their comparison which are mitigated by specifically using Overleaf.
Overleaf solves a lot of the same problems as Typst, although since it's still within the LateX ecosystem. For example changes are immediately visible (or immediately after a recompile, but practically I almost never notice) and Overleaf tries it's best to parse and simplify the dense error messages. So some of their points against LateX have been partially/entirely solved.
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.
right, Typst is bigger than the online editor. The language and compiler would replace latex. It seems Overleaf is an online editor?
Yes, LaTeX error messages are next to useless.
the biggest being I can copy in LateX file and get all the benefits of overleaf! I Love overleaf
> For example changes are immediately visible
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.
Right, my understanding was that by "immediately" they meant "way faster than LaTeX". You make a good point about consolidated errors though, I hadn't thought about that before.
for anybody who is wondering, the typst web app is a smoother user experience, having had to use overleaf for some smaller projects only, ive found it slightly janky, sometimes, probably owed to how slow and strange latex compilation can be. I'm sure the typist web app lacks some cool project management features that overleaf may offer, since it's a more mature platform, but with how much nicer typst is compared to latex, I think any shortcomings the web app may have are offset by that. but for sufficiently technical people collaborating via git is imo nicer than any web app.
Yeah, and comparison with Word make absolutely no sense. In word you don't need to go through the entire document to change some style, you just use predefined formatting styles like "Heading 1", "Quote", etc. and if you change something in those predefined styles it will be automatically applied to the entire document. You can also work with others on same document at the same time.
I wish that would work with non-tech people. In my experience, no matter how hard you try to teach them, they'll end up messing up the formatting in some way.
This. ALmost nobody knows/uses that feature.
FTR, there are also many people who use LaTeX in a similar way...
Fair enough - but how would you improve the UX?
How hard would you try to teach them to use Typst?
You can do the same thing with Typst. There may be fewer predefined "styles", but you can just define your own quite easily. And they're far more powerful than in Word.
This was cool, but the best thing was the dedicated transition guide from LaTeX to Typst[1].
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.
[1] https://typst.app/docs/guides/guide-for-latex-users/
Where is this section? As soon as I read your comment, I wanted to go read this section and see if they mentioned tools like Google docs or Quip. Yet, I wasn't able to find any such section.
I liked "sign up for free and try it now" for the same reason.
Where is the comparison with markdown? Coming from a quarto/Rstudio background here
Markdown on its own isn’t in the same league as latex and similar systems. Off the top of my head, markdown doesn’t support: Figures outside the flow of the document, references, layouts (columns, etc), comments, formulas, a standard and good looking pdf output, page breaks, custom layouts for authors / abstract / etc, numbered chapters, autogenerated table of contents, custom blocks with different formatting, footnotes, appendixes and a whole lot more.
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.
This is not the same league, maybe not even the same sport.
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.
I agree they are playing different sports!
Ideally, unrendered markdown still provides a first-class reading experience.
I don't think Typst has that as a design goal.
Typst texts are quite readable, the language has explicit support to make it as good as feasible (e.g. longer text parameters can be passed unquoted within a [] block, so it is still left readable). Plus you can abstract away more complex configs inside a function, and end up with `#myFunc [My normal unquoted text]`
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.