# Typst and other alternatives to LaTeX

**URL:** <https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652>\
**Category:** Offtopic\
**Tags:** latex\
**Created:** [October 22, 2024, 1:45am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652 "2024-10-22T01:45:53Z")\
**Posts on this page:** 20\
**Page:** 10

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [October 6, 2025, 4:16am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/181 "2025-10-06T04:16:05Z")

</div>

I don’t quite understand how Quarto works with `typst`. Suppose you have a `qmd` file

```julia-auto
---
title: "Hello Typst!"
format:
  typst:
    toc: true
    section-numbering: 1.1.a
    columns: 2
---

```

This file will be compiled using `typst` and is quick. However, any mathematics that you write in the `qmd` file is `latex` notation, i.e.,

```julia-auto
---
title: "Hello Typst!"
format:
  typst:
    toc: true
    section-numbering: 1.1.a
    columns: 2
---
This is my equation: $\frac{a}{b} = \pi$. 

```

Does anyone know if you can actually write `typst` notation/language in the markdown file?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [October 6, 2025, 9:03am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/182 "2025-10-06T09:03:36Z")

</div>

Typst blocks are written like this

````julia-auto
```{=typst}
$ x + y $ and other markup
```

````

> **[Typst Basics – Quarto](https://quarto.org/docs/output-formats/typst.html#raw-typst)**

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [October 6, 2025, 3:27pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/183 "2025-10-06T15:27:39Z")

</div>

Right, but those are blocks. If you want to type ‘regular’ math (e.g., inline equations), you still have to type latex.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [October 6, 2025, 5:22pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/184 "2025-10-06T17:22:57Z")

</div>

For inline try

```julia-auto
`something`{=typst}

```

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [October 6, 2025, 6:45pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/185 "2025-10-06T18:45:27Z")

</div>

> [@kevbonham](#):
>
> One thing I did was compress a table quite aggressively - shrank the padding in the cells, made the table text smaller, etc. Then I put it to the side in a column that was only 30% of the width of the page, with text in the other 70%, but to make it clear I put a light gray box around the table and its legend. This kind of things might be possible with quarto, but given my experience I don’t think it would be straightforward.

Were you able to do this on typst?

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [October 6, 2025, 6:47pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/186 "2025-10-06T18:47:07Z")

</div>

> [@zdenek\_hurak](#):
>
> I have been using Quarto on a daily basis for some two years.

Thanks, those examples look nice.

---

<div class="post-metadata">

**Author:** ![LeePhillips](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leephillips/32/205514_2.png) [@LeePhillips](https://discourse.julialang.org/u/LeePhillips)\
**Post date:** [October 6, 2025, 8:09pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/187 "2025-10-06T20:09:12Z")

</div>

I know you’re discussing Quarto here, but with Pandoc at least you can target LaTeX output while using Typst syntax for math input, mixed with Pandoc Markdown. See the Conclusion section of [Typst: a possible LaTeX replacement [LWN.net]](https://lwn.net/Articles/1037577/).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [October 7, 2025, 6:19am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/188 "2025-10-07T06:19:15Z")

</div>

> [@yvikhlya](#):
>
> Quarto/Pandoc approach instead of using the latex or typst directly before I make my own (possibly wrong) choice.

This depends on the _content_ mostly, not the output requirements. You can tweak output to whatever appearance you prefer in any of these alternatives.

For simple markup requirements (headers, bold, italic, links, lists, cross-refs, simple figures), Markdown is hard to beat. You can use tools like Pandoc to emit PDF, HTML, various ebook formats, etc. If your markup requirements fit Markdown, choose that, it is the best choice, future-proof, low bar for contributors, simple to type, etc.

If you want more than trivial math, advanced/fine tuned figure placement, choose LaTeX or Typst. Which one fits your project best depends on your tolerance for rough edges (Typst has quite a few, but they are being worked on), previous knowledge (you may know LaTeX), compilation time (Typst is faster, but this matters mostly for for very large documents).

If you want dynamically generated content (eg results from code), Quarto is probably the best choice.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [October 9, 2025, 8:25am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/189 "2025-10-09T08:25:09Z")

</div>

Like many other I don’t think there’s one single best system but it depends a lot on what you want to do and what constraints you have.

I believe that you can get a decent idea whether typst is an interesting tool for you by playing with it for an hour or so. Start with a tutorial and go on to try something more complicated that’s important for your needs.

This writeup of experiences [writing a PhD thesis in typst](https://fransskarman.com/phd_thesis_in_typst.html) may be of interest to people weighing typst against latex.

For my needs at work I’m replacing a markdown+pandoc+latex+latexdiff+julia stack with only typst+julia, with nice gains in simplicity, speed, and writing experience. The only missing piece is a new typst release (which does seem to be getting close) with enough HTML export functionality for our limited needs.

---

<div class="post-metadata">

**Author:** ![Syzygies](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Syzygies](https://discourse.julialang.org/u/Syzygies)\
**Post date:** [October 18, 2025, 2:25pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/190 "2025-10-18T14:25:25Z")

</div>

Typst is better suited than LaTeX for sharing with AI.

I am a 70 year old mathematician, succeeding to a greater extent than conventional wisdom believes possible at becoming hybrid with AI for my research and coding. I pay $200 monthly for top tier individual access to Anthropic’s models. I have struggled mightily over the past year in experiments to sort out what works. What doesn’t work is listening to the noise out there; most people have no clue how to effectively use AI.

One needs to make a radical shift in perspective from “solo programmer” to “CTO of an efficient organization”. One plans, one plans to plan, one conducts code reviews, in collaboration with AI. One finds best ways to reify all thought, for an historical record AI can consult.

AI can read LaTeX documents, but they’re verbose, and written in a ghastly language structured poorly for AI. AI can read PDF files, but they’re verbose, and written in a ghastly language structured poorly for AI.

Even if one has an unlimited budget and can tolerate weaker responses, using either LaTeX or PDFs with AI is contributing to global warming.

If Markdown or AsciiDoc or similar markup languages do not suffice for one’s documentation, Typst is an ideal choice. It’s terse, and far more expressive than Markdown. Humans read the output. AI reads the source.

My code documentation resembles a math text, so I need Typst.

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [October 18, 2025, 9:04pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/191 "2025-10-18T21:04:52Z")

</div>

Spot on for both Typst and using AI, which is much more like being a project manager than an individual coder.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [October 18, 2025, 9:51pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/192 "2025-10-18T21:51:19Z")

</div>

If this is true, I find it both appalling and depressing. Being a project manager is my worst nightmare. I only want to solve problems, but now that is being taken away.

AI kills the human spirit. All that is left is management 🙁

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [October 19, 2025, 4:36pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/193 "2025-10-19T16:36:05Z")

</div>

A stupid manager at that: [Should General have a guideline or rule preventing registration of vibe-coded packages? - #61 by PetrKryslUCSD](https://discourse.julialang.org/t/should-general-have-a-guideline-or-rule-preventing-registration-of-vibe-coded-packages/133205/61)

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [October 19, 2025, 8:07pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/194 "2025-10-19T20:07:43Z")

</div>

Well, sure, just like vibe coding is stupid, mostly. But is it a better use of time to write your own docstrings than to review auto generated?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [October 20, 2025, 1:21am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/195 "2025-10-20T01:21:24Z")

</div>

I find that writing docstrings uncommonly sharpens my understanding of what it is I want to accomplish with the code. To the point where I start hacking on the code based on what I learned writing the docs…

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [October 20, 2025, 2:01am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/196 "2025-10-20T02:01:26Z")

</div>

That is admirable. I’m more like what I expect the majority is apt to do, which is to put off writing the docstrings “until everything is final.”

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [October 20, 2025, 12:45pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/197 "2025-10-20T12:45:27Z")

</div>

> [@Syzygies](#):
>
> AI can read LaTeX documents, but they’re verbose, and written in a ghastly language structured poorly for AI.

Can you explain this? My impression is that when it comes to document structure, LaTeX and Typst constructs map almost 1:1 to each other, eg [as explained here](https://typst.app/docs/guides/guide-for-latex-users/). I don’t see how one would be more complicated than another for LLMs.

> [@Syzygies](#):
>
> Typst is an ideal choice. It’s terse, and far more expressive than Markdown. Humans read the output. AI reads the source.

I am somewhat surprised that LLMs found enough training material for Typst to work better than LaTeX for this purpose.

---

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [October 20, 2025, 1:04pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/198 "2025-10-20T13:04:20Z")

</div>

> [@Tamas\_Papp](#):
>
> My impression is that when it comes to document structure, LaTeX and Typst constructs map almost 1:1 to each other, eg [as explained here](https://typst.app/docs/guides/guide-for-latex-users/).

I think for a typical declarative LaTeX document that’s true. But I wouldn’t be surprised to see large differences with anything that involves “programming”, and many documents include some programming bits. I mean Typst is a mostly “pure” language (in the sense of function purity) so pieces of code can be understood locally, and the scripting language makes common tasks simple to implement. TeX is the opposite of that, e.g. macro definitions in one file can even change how code is parsed in another file, and any task with complexity north of “store / retrieve value from array” requires ridiculously complicated macro sequences.

Taking an example from a [totally random paper I promise](https://arxiv.org/abs/2503.24187):

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/4/f4d4fb94c38628e61a8da7767ecb85700b12cd49.jpeg)

(Not the typical LaTeX code in an article source of course 🙂 but the middle-ground might indeed be in Typst’s favor)

> [@Tamas\_Papp](#):
>
> I am somewhat surprised that LLMs found enough training material for Typst to work better than LaTeX for this purpose.

Claude already understands Typst fairly well in my experience, it even translated some of my TikZ figures to (ugly) CeTZ figures.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [October 20, 2025, 1:28pm UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/199 "2025-10-20T13:28:18Z")

</div>

> [@sijo](#):
>
> Typst is a mostly “pure” language (in the sense of function purity) so pieces of code can be understood locally

Typst is indeed better designed than LaTeX in this respect, but on the other hand LaTeX is fairly mature, so most users can get away with no programming _per se_, just loading existing packages.

I am a heavy user of LaTeX and most of my “programming” consists of various simple expansions with `\newcommand`.

---

<div class="post-metadata">

**Author:** ![mj2984](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mj2984/32/43833_2.png) [@mj2984](https://discourse.julialang.org/u/mj2984)\
**Post date:** [October 27, 2025, 3:45am UTC](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652/200 "2025-10-27T03:45:59Z")

</div>

I was recently upgrading my resume from word format to some type setting format. First tried latex, because supposedly it was the preferred industry standard. Upon the second dependency it asked, I realized I’m going to use typst instead (used latex/overleaf before for my papers and the spiraling dependencies gets complicated quickly. As bad as python). The result was beautiful, and I do not see any looking back.

[Previous page](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652.md?page=9)

[Next page](https://discourse.julialang.org/t/typst-and-other-alternatives-to-latex/121652.md?page=11)
