July 20th, 2024

Typst: An easy to learn alternative for LaTex

Typst is a user-friendly markup typesetting system on GitHub as an alternative to LaTeX. It offers formatting, scripting, math typesetting, and bibliography management. Find installation and usage details on the repository.

Read original articleLink Icon
ExcitementSkepticismComparison
Typst: An easy to learn alternative for LaTex

Typst is a markup-based typesetting system available on the Typst GitHub repository. It aims to provide a powerful alternative to LaTeX while being more user-friendly. The system includes built-in markup for formatting, flexible functions, a scripting system, math typesetting, and bibliography management. The repository houses the Typst compiler and its command-line interface for local document compilation. For further details on Typst, including installation instructions, usage guidelines, community resources, contribution guidelines, and design principles, visit the Typst GitHub Repository at the provided URL.

Related

Polytype: A Rosetta Stone for typesetting engines

Polytype: A Rosetta Stone for typesetting engines

Polytype is a project like Rosetta Code but for typesetting engines. It compares how different engines handle layout and orthographic features. Contributions are welcome via GitHub for new samples and improvements. Users can build examples locally and test the website.

Stamp: A Mini-Language for Templates

Stamp: A Mini-Language for Templates

Stamp is a concise mini-language for project templates, enabling easy creation and management of files and directories for various programming languages. Created by Breck Yunits and Guillaume Papin, it requires Scroll for installation and offers a simple alternative to tools like cookiecutter.

Chr – terminal editor inspired by Turbo Pascal editor from 1997

Chr – terminal editor inspired by Turbo Pascal editor from 1997

A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.

Alternative File-Type extension for TypeScript files (.ts = MPEG-2 video)

Alternative File-Type extension for TypeScript files (.ts = MPEG-2 video)

The TypeScript repository on GitHub enhances JavaScript with optional types for large-scale applications. It includes GitHub Actions CI, npm version tracking, download statistics, and an OpenSSF Scorecard for security assessment. Access it on GitHub.

Building the New Hypermedia Systems

Building the New Hypermedia Systems

The new edition of Hypermedia Systems was redesigned using Typst, a LaTeX replacement, improving design fidelity. Challenges in PDF generation were overcome, enhancing typesetting quality and design flexibility significantly.

AI: What people are saying
The comments on the article about Typst, a user-friendly markup typesetting system, highlight several key points:
  • Many users find Typst to be significantly faster and more resource-efficient than LaTeX, especially for large-scale PDF generation.
  • Typst is praised for its intuitive and user-friendly templates, making it easier for developers and academics to use compared to LaTeX.
  • Some users express concerns about Typst's long-term viability and support, comparing it to the established and widely-used LaTeX.
  • There are mixed opinions on Typst's handling of complex mathematical typesetting and fine typographic features, with some preferring LaTeX for these tasks.
  • Typst's integration with tools like VSCode and its ability to handle JSON input are appreciated, but some users miss LaTeX's extensive package library and versatility.
Link Icon 47 comments
By @mr-karan - 4 months
Typst has been pretty amazing, and at my organization, we’re very happy with it. We needed to generate over 1.5 million PDFs every night and experimented with various solutions—from Puppeteer for HTML to PDF conversions, to pdflatex and lualatex. Typst has been several orders of magnitude faster and has a lighter resource footprint. Also, templating the PDFs in LaTeX wasn’t a pleasant developer experience, but with Typst templates, it has been quite intuitive.

We’ve written more about this large-scale PDF generation stack in our blog here: https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes

By @sprinkly-dust - 4 months
Having composed many pieces of coursework using Typst, I must say that it certainly makes academic writing more streamlined, engaging, and dare I say fun — though that might just be me. The functional nature of Typst's syntax ensures I don't have the erratic behaviour emblematic of modern day Microsoft Word and sometimes even Google Docs. Using a local IDE such as VSCode brings all the features one could like.

In comparison to LaTeX, overall document typesetting is far more straightforward. However, for long multi-page stretches of equations solving, I feel that LaTeX is easier to type than Typst because its syntax is not that of a functional programming language but more akin to markdown. Thus, one does not need to think as far in advance when typesetting equations with lots of functions, superscript, and subscript.

By @mkl - 4 months
A number of past discussions and related things: https://hn.algolia.com/?q=typst

1 year ago, 146 comments: https://news.ycombinator.com/item?id=35250210

8 months ago, 34 comments: https://news.ycombinator.com/item?id=38354422

2 years ago, 53 comments: https://news.ycombinator.com/item?id=34423590

2 years ago 30 comments: https://news.ycombinator.com/item?id=32209794

By @MaxBarraclough - 4 months
I'm surprised to see that HTML output is currently in progress, and was not a core feature from the start. [0]

LaTeX's awkward relationship with the web seems like something a competing greenfield project would try to nail right out of the gate (to mix metaphors painfully).

[0] https://github.com/typst/typst/issues/721

By @mr_mitm - 4 months
I can't wait for LaTeX to go away in favor of Typst. The experience is night and day. Very impressed with their work.

I've been using Jinja2 templates to generate TeX files, but Typst can take a JSON over the command line and is easy to use and powerful enough that I can completely remove the Python step.

Not to speak of the compile time that is measured in milliseconds.

By @ttul - 4 months
Working as an intern in 1999, I was tasked with writing a standards document for VoIP telephones for the TIA working group working on this space. The standards organization had a Word template that everyone used, but as an engineering student, I had been working with and loving LaTex for some time and so naturally I thought… “why not just use LaTex? The final output will be in PDF anyway and the formatting will be better.”

The LaTex output was indeed better. My boss loved my work and had no idea that I wasn’t using Word. Feedback from the working group members was also positive. Wow, this kid has real talent! As a startup, making a positive impression on the giant companies represented in the working group was extremely important for the future of the company, if not its survival.

Unfortunately for me, one day my boss said, “could you send that Word doc over to big-whig so-and-so at massive-company-we-might-be-acquired-by? They want to use it as a template for a new document they’re writing.”

I got that sinking feeling similar to when my mom found out my friend and I had peed in my closet as an experiment at age four.

I then hired a friend to work all weekend painstakingly rewriting it in Word. Boss man got the document. Company was acquired for $100M 18 months later.

Either way, LaTex still looks 1,000x better than Word.

By @karencarits - 4 months
I guess this is a competitor to services such as overleaf [1] and codimd [2]. Although this is yet another syntax, it seems to be supported by pandoc [3]. Lately, I have been using Quarto [4] more and more as I program in R, which also produces very nice outputs, especially HTML. But none of these solve the academic usage problems of (1) producing nice diffs for reviewers, and (2) can easily be shared with, and commented by, non-technical collaborators. Thus, I fear Word will be difficult to replace for many years, at least in my field, for scientific writing

[1] https://github.com/overleaf/overleaf

[2] https://github.com/hackmdio/codimd

[3] https://pandoc.org/typst-property-output.html

[4] https://quarto.org/

By @anserin - 4 months
The main problem I have with Typst compared with LaTeX is that it doesn't handle basic fine typographic features, such as the different types of spacing in mathematical mode (mathop, mathbin, mathrel, etc.) or the size of delimiters (big, bigg, etc.)
By @ARandomerDude - 4 months
This looks really great and I'll give it a try. I keep thinking, however:

My guessed probability that LaTex is free and maintained in 15 years: 99.9999%

My guessed probability that $OTHER_NEW_TOOL is free and maintained in 15 years: 5%

By @Ilasky - 4 months
I love Typst. It’s especially good for dealing with programmatic input as the —input flag can take json. [0] Then, in the file it’s easy to get the json with the dedicated json.decode() function. Super easy to get solid results. Swapped to it from LaTeX in my own project [1]

[0] https://typst.app/docs/reference/foundations/sys/

[1] https://resgen.app

By @fhd2 - 4 months
Seems like it's not built on top of LaTex, so you presumably can't drop into LaTex when Typst can't do what you need, or did I just miss that?

LaTex is positively arcane, but I still use it for all my writing since it's so incredibly versatile: Academic papers, letters, contracts, forms, invoices, tons of packages, pretty easy to apply regional standards, ...

How I manage to not go insane is Org Mode: I can write almost everything in something similar to Markdown but do inline LaTex as needed (since it compiles from Org to Latex to PDF). I find that incredibly powerful.

By @pocket_titan - 4 months
I've been finding Typst a great tool for ~90% of my use-cases — in the other 10%, I'll still reach for LaTeX for the extra power (tikz, pdf images, tagged pdfs (!) (this is becoming more and more of a requirement when publishing/submitting academic texts, and AFAIK Typst does not support it yet), but that's okay. Excited to see where it goes, as LaTeX is very beginner unfriendly and I'd love to see the barrier to entry for typesetting lowered so my more non-technical friends can share in the power of pretty texts & CVs.
By @trostaft - 4 months
I'm following the progress of this package, I would not mind a more modern successor to LaTeX. I'm an academic, and I actually do not mind LaTeX. I find actually writing LaTeX to be fairly natural. But every time I come to the programmatic interface I feel like there's a lot of room for improvement and that's the most exciting aspect of typst.

I cannot, reasonably, start using this for work until journals begin accepting papers in the format. But I am following until either that starts happening, or some workaround exists.

By @Aerbil313 - 4 months
I'm a college student and I use Typst in school all the time. I know I should just use Google Docs/Sheets, but because it's code instead of a WYSIWYG editor it's very easy to create reusable and consistent styles for reports and presentations, and saves time on the long run. (I use polylux module for slides.) Once you get past the learning curve (10-15 hrs if you nosedive) it's incredibly easy to create professional stuff.
By @amai - 4 months
Unfortunately out of the box typst is missing an important layout features compared to Latex: the auto-generation of headers (showing the section name in the header). There are some packages that help you with that:

- https://typst.app/universe/package/hydra,

- https://typst.app/universe/package/chic-hdr

- https://typst.app/universe/package/wonderous-book

However I believe this functionality should be available in the typst core.

By @__mharrison__ - 4 months
I would love to replace latex but I only use it for making physical books and none of the replacements have the features needed...
By @renerick - 4 months
I make TTRPG character sheets with Typst. No only they look great with perfect page layout, the programming capabilities allow to compute everything from ability scores automatically, like Excel. It's really well designed, and fast too, VS Code integration just works (for me at least)
By @pgen - 4 months
I personally prefer ConTeXt (https://wiki.contextgarden.net/ConTeXt_Standalone).

It's comparable to LaTeX, but better in my opinion.

By @owenpalmer - 4 months
This is a Typst + Neovim live preview project: https://github.com/chomosuke/typst-preview.nvim

It looks similar to Gilles Castel's famous note-taking setup:

https://castel.dev/post/lecture-notes-1/

I would love to see someone combine this with Anki for quick math flashcard creation

By @hgyjnbdet - 4 months
I saw this come up today in a different thread.

I'm a mature undergrad, I've never used LaTeX, actively avoided it in fact and am forced to produce word documents. My current workflow is pandoc style markdown and obviously pandoc for conversion, with zotero for citations. I make use of pandoc-crossref for figures, tables, sections, etc.

I'm hopefully moving to a different uni for a masters this year. Can anyone who uses typst comment on whether I should consider moving from my fairly complicated workflow to typst?

By @byteplane - 4 months
I’d be happy if this takes off just for the fact that their default typeface (or at least the one shown on the website) is so much better than “Computer Modern”!
By @zmmmmm - 4 months
We use a custom tool that bases everything on markdown for this type of thing. It also integrates Jupyter notebooks. It is mostly very effective but the limitations of Markdown certainly grate. Having said that the best thing by far is that it's automatically viewable in Gitlab/Github in source form. This doesn't look like it would fare all that well.
By @uger - 4 months
I love Typst for text and equations, but I find that it is taking me time to adapt to their table syntax and be able to make tables similar to booktabs. I'm hoping that Estout or Modelsummary will be able to write Typst tables with complex formatting soon.
By @isatty - 4 months
Disclaimer: I haven’t tried the syntax but it doesn’t scream “easier” to me. Latex doesn’t either.

Plus this doesn’t seem to compile down to latex so I also lose the engine. From experience, latex makes beautiful documents and choices which I’ll always prefer over ease of use.

By @Shorel - 4 months
Two things interest me from this project:

More templates than LaTeX. I have made PDF presentations in LaTeX, which look good, but they all look the same. Some variety is good.

Unicode chars support. I prefer to type α instead of \alpha.

That's it, both things together will make a LaTeX killer for me.

By @jbd0 - 4 months
Seems like a pain to install. I'm looking forward to this being packaged for Debian.
By @rochak - 4 months
Have been using it for a while. Can’t overstate how much better the experience has been compared to LaTeX. As someone who had to use LaTeX not out of choice, I’m so grateful this exists so that I can no longer bother to decipher the mess of LateX.
By @Neywiny - 4 months
This feels like a mix of markdown readability with latex control. I'm not sure yet that I need that middle ground. Currently I'm doing docs in markdown, reports in Python generated tex, coupled with hardcoded preambles. That seems fine so far.
By @sivsivsree - 4 months
Been using this for a while for all my organization documentation, helps me keep the consistency and identity among the peers.
By @xyst - 4 months
This is very easy to use compared to latex. My latex resume (or the template I was using) was thousands of lines and had several imports of custom classes.

Re-did my resume using one of their templates, and it’s much easier to maintain now.

By @amai - 4 months
By @bucephalos - 4 months
Nowadays, I use Latex mainly for letters using the great KOMA package. I wouldn't mind switching to a markdown based system for that. Would Typst work to produce DIN format letters?
By @8n4vidtmkvmk - 4 months
Can I use this to generate PDF invoices from PHP?

I've been searching for a good solution for the past 15 years. Never been happy with the solutions, and my PDFs are always very ugly.

By @kerkeslager - 4 months
This is the sort of thing that I'm excited about because it solves problems I have, but can't really use for much because I'm not sure if it will exist in a year.
By @spacebuffer - 4 months
This is very interesting, seems to be like LaTex + a whole lot more.

I need to generate udemy-style certificates for a project I am working on. are there any guides on generating PDFs with typst?

By @hgyjnbdet - 4 months
Quarto appears a popular alternative, out of interest is anyone using Zettlr?

https://www.zettlr.com/

By @Duanemclemore - 4 months
Oh it's pandoc compatible which means my favorite LaTeX trick is possible - writing in an IDE then using pandoc to convert to icml for linking inside InDesign.
By @drsopp - 4 months
From the first example, I don't understand from the syntax why the first formula becomes inlined while the second one is centered on the page.
By @thefringthing - 4 months
Just don't try to put a footnote in a heading. I'll keep using LaTeX until Typst is less buggy.
By @summarity - 4 months
I can't get past the sign-up form: "503 Service Temporarily Unavailable"
By @wiihack - 4 months
I use Typst every day for my work. It is great software.
By @ThinkBeat - 4 months
Where does it get its font from?
By @aragilar - 4 months
Does this have support for macros? It doesn't appear to, and so feels a bit like another variant on markdown (with its own special syntax)? It's not clear to me why I'd use this, compared with RST (where I can generate LaTeX or HTML, and script with python)?
By @mohamez - 4 months
The best thing about Typst is that it's intuitive.
By @humanfromearth9 - 4 months
So, anyone using it?
By @kkfx - 4 months
LaTeX is not just a set of macros over TeX to produce (nowadays) some pdf, it's a very big library of ready-to-use packages for pretty anything, that's VERY hard to "substitute".

You want inspiration for some strange table layouts? There are gazillion ready made; some graph? TiKz/PGF have gazillions of ready made examples... Want a programming language in the middle? Python, Lua etc can be embedded straight away.

So far I've seen few tentative to "replace or hide LaTeX", from the old DocBook to ConTeXt, no one succeed simply because of all the LaTeX already made and easy to import. Having alternatives, especially seen the actual "fragmented" development is nice, but honestly I doubt it can take off. Proprietary products are fast to wane in popularity if a serious competitor pops up because the users does not own them, FLOSS are much calmer since anyone can grab a piece and integrate ideas of someone else without the need to switch.