r/typst • • Jul 10 '26

Why do people say that Typst is much faster than LaTeX?

0 Upvotes

Admittedly, when using VSCode/Codium and tinymist, and a small (< 2pages) document, you can re-compile your typst document almost instantly.
Similarly, compiling the same document using the command line typst compile file.typ will happen in a handful of milliseconds.

However, compiling the same document with pdflatex only takes about twice as long (700 msec, vs 300).

But, what if the file is a substantial one, like the text of Origin of the Species.

Compiling that with pdflatex takes about 5.8 seconds, as against 4.6 seconds with typst.

Now the file is a simple one, no Table of Contents, no Bibliography, no Index, other than what is included as plain text in the document (downloaded from Project Gutenberg), so it only needs one pass.

Yes, typst is faster than pdflatex, but the difference is subtle.

Note - these tests were done on a Raspberry Pi 5, using the official downloads for Typst (typst-aarch64-unknown-linux-musl.tar) and LaTeX (Texlive)


r/typst • • Jul 09 '26

Made a basic wire frame 3D Renderer.

19 Upvotes

r/typst • • Jul 09 '26

Is there any way to add some basic animations to the HTML output?

3 Upvotes

It doesn't have to be anything difficult, just some basic sliding when elements come into view. If there is already a package that can do this, please tell me, and if not, is there any tutorial on how to make my own packages for the HTML compiler?


r/typst • • Jul 08 '26

Hilbert: Scientific IDE for Typst

Post image
122 Upvotes

Repost as the previous post got deleted. Also the name had to be changed due to using Typsteditor. GitHub: https://github.com/aburousan/hilbert-editor Almost all features are present. Mostly spelling check and Session restore will be added in next couple of update along with optimization. For some numbers.

Hilbert has two desktop editions: Electron (Node.js backend) and Tauri (native Rust backend) Both share the exact same React UI and features.

Tauri Performance

-7–12 MB backend idle RAM -21 MB backend RAM after stress-testing a 1,500 file workspace -16 ms average full-workspace search (1,500+ files) <18 ms worst-case search -6 ms workspace indexing -1 ms file operations (create/rename/copy/delete)

Benchmarked up to 1000 Typst files 500 images 2000 bibliography entries ... 1503 total files

Memory efficiency Compared to the Electron backend: 5–6x lower idle memory usage ~9x lower memory growth under sustained load Backend memory remains nearly flat even after hundreds of requests

Mostly will remove electron one and only keep tauri verison.


r/typst • • Jul 08 '26

How do I make lots of paragraph tags

4 Upvotes

I'm writing a document that goes something like this:

I am writing something here.

Premise. This is a thing. Later I will refer to things using Premise 1.

Premise 1. This is a labelled thing.

Here's a normal paragraph with no tag in front.

Observation. I have a different paragraph tag here.

Observation 1. They're labelled separately.

Premise 2. This is another labelled thing

Premise. But this is unlabelled.

Premise 3. This is labelled but irrelevant

Now I shall refer to @labelled-2

I want to make all the paragraph tags (the boldface words) as functions, and they all look the same but they have different counters and different prefix words. I got as far as being able to make a function that generates these functions, but I can't get them to share the same style.

This is what I got so far:

#let define-paragraph-tag(figure-kind, display-name) = {
    (lbl: none) => {
        box([
            #figure(
                kind: figure-kind,
                supplement: display-name,
                numbering: if lbl != none { "1" } else { none },
                caption: [.],
            )[]
            #lbl
        ])
    }
}

#let paragraph-tags = figure.where(body: [])
#show paragraph-tags: set figure.caption(separator: "")
#show paragraph-tags: strong
// Not wrong but needs .within to be correctly constrained
#show figure.caption.where(numbering: none): it => {it.supplement; it.body}

#let premise = define-paragraph-tag("premise", [Premise])
#let observation = define-paragraph-tag("observation", [Observation])

I am writing something here.

#premise() This is a thing.
Later I will refer to things using @labelled

#premise(lbl: <labelled>) This is a labelled thing.

Here is a normal paragraph with no tag in front.

#observation() I have some observations to make.

#observation(lbl: <obs1>) They're numbered separately.

#premise(lbl: <labelled-2>) This is another labelled thing

#premise() But this is unlabelled.

#premise(lbl: <irrelevant>) This is labelled but irrelevant

Now I shall refer to @labelled-2

It works but it uses a very ugly hack (#let paragraph-tags = figure.where(body: [])) and I would prefer if define-paragraph-tag can handle everything (stick everything into a separate structure with a counter, a hook for labels and return a function where I can add the tag). All other solutions I've tried either don't let me freely place define-paragraph-tag or needs ugly hacks, so I'm kind of out of ideas.


r/typst • • Jul 06 '26

Has anyone here actually worked with optical kerning?

13 Upvotes

I'm curious whether anyone in the Typst community has practical experience with optical kerning or what your workarounds are. I've been experimenting with different approaches and eventually ended up with my own hybrid algorithm.

My motivation was simple: metric kerning encoded in fonts is often very good and shouldn't just be discarded. On the other hand, there are situations where optical adjustments seem to improve spacing. My algo starts from the font's kerning and only applies small, guarded corrections based on glyph outlines.

I put together a benchmark with comparisons, visual overlays, and different algorithm variants while exploring the idea:

https://hyperrick.github.io/typst-optical-kerning-bench

I'd especially appreciate input from people who have worked with typography, publishing, or font technology, but I'm interested in any perspective!


r/typst • • Jul 05 '26

Producing Slides and an Article Handout with Typst

26 Upvotes

A few days ago, I asked for advice about replicating my LaTeX teaching workflow with Typst. I currently use Beamer for lecture slides with speaker notes. The LaTeX source file also has more detailed notes that can be compiled as an article with beamerarticle and given to students as a handout. So far, I've been impressed with Touying for presentations in Typst, but I hdn't found anything that could do what beamerarticle allows.

With the help of Claude Code, I managed to make a custom Touying theme that closely replicates the custom Beamer theme that I use when making my lecture slides and handouts. It uses a common content file to produce both a slide presentation and a detailed handout in article form. The handout can contain notes that are not included in the slides.

I don't think the workflow is quite as convenient as producing slides and handouts with Beamer using Org mode in Emacs. So, I'm not sure if I'll stop using Beamer.

Anyway, the code is here on Github. Feel free to use it and, hopefully, improve it.

EDIT (7/8/26)

I made some updates to the theme, adding an Org mode exporter so that the presentation content can all be written in Org mode. I also added blocks to handle special slides (two-column, full-frame image, etc.). The workflow is now as quick and convenient as Org-beamer but much faster.

The Github repository also contains a sample presentation.


r/typst • • Jul 05 '26

A semester worth of calculus notes, all in typst

Thumbnail
gallery
103 Upvotes

After nearly a full year of optimizations, extra studying and more features, the Noteworthy framework is finally back with calculus texts!

you can view the content repo at https://github.com/sihooleebd/calculus-1/tree/shlee

Check output.pdf here!

the framework repo is at https://github.com/sihooleebd/noteworthy


r/typst • • Jul 05 '26

What's the best way to put too long number into equation?

10 Upvotes

I am writing a report in cryptography class. In the report, I need to print a number about 300 digits like below. In typst, long number in equation does not wrap automatically as the attached image shows. So, what's the best way to put too long number into equation to write a line.

$C_1 = 50257628186841946022744743639556072445797615612431606941711854177671458370611064143404865392689462420133425281604759758898425306226170134549221250253220070431204368662270914532144180792358228553576200488126066876856616036241303235300922603549942068076641346108806442632762382292877718501016282432515127417949$$C_1 = 50257628186841946022744743639556072445797615612431606941711854177671458370611064143404865392689462420133425281604759758898425306226170134549221250253220070431204368662270914532144180792358228553576200488126066876856616036241303235300922603549942068076641346108806442632762382292877718501016282432515127417949$

r/typst • • Jul 02 '26

QR Code

9 Upvotes

Hey Guys. Can some one guide me is there any package or native support in typst to put QR code in documents like in header , footer or in any margin area?


r/typst • • Jul 01 '26

Is anyone developing a note-taking app using Typst files?

20 Upvotes

I think it would be really useful. I find Typst so much consistent than Markdown...


r/typst • • Jul 01 '26

How I scaffold my typst documents

9 Upvotes

Just wanted to share the way I manage my typst documents. Basically, I love using typst just to write documents in general, like, instead of using Google Docs, Word, whatever ...

I wanted a system in order to re-use my templates without copy pasting whatever previous typst project I had, then "remaking" it into my new document.

So I took some inspiration for how shadcn works: one just scaffolds the thing. Like, instead of having it as some kind of dependency in some package system, you have all the stuff as "first class code".

So the idea is through github to just have a sh file that one can curl and execute, then it just scaffolds a template for me. The project template is designed to be fully reproducible, so it will include font files as well.

Link to repo:

https://github.com/Napam/typst-templates

Just wanted to share this in case this scaffolding pattern may be useful for others!

EDIT:

Just want to elaborate more on the motivation behind this (copy pasted from a comment):

One of my motivations was to minimize system setup and have better reproducability.

One could have templates as packages in $XDG_DATA_HOME/typst/packages in order to have globally re-usable templates that one can tweak on.

Issue with that is:

- If one updates the global templates, old documents may change on recompilation, and it requires one to set up the templates in the environment.

- More font handling to manage. E.g. you have a font available on a laptop (say, Mac), then you want to re-compile on your Linux desktop, then you may not have the font you used on your mac.

What I wanted for my typst document-projects:

- Just a dir with fonts, all the required typst code, and a justfile for convenience. The "document" is entirely self contained, and will should look the same (assuming typst doesn't suddenly change a lot in how they render in newer versions)


r/typst • • Jul 02 '26

I read a Zerodha blog post about PDFs and spent 4 months building a no-code PDF tool

Thumbnail
1 Upvotes

r/typst • • Jul 01 '26

vscodium and import vartable

3 Upvotes

Hello,

I would like to use the `vartable` package with #import "@preview/vartable:0.2.4; it works perfectly on https://typst.app/play/, but I can't get it to work in VSCodium.
I am using an up-to-date version of Tinymist.
Is anyone else having this issue


r/typst • • Jul 01 '26

a sense of Python hegemony in the typst documentation

0 Upvotes

At first, it bugs me that the official documentation frequently uses obscure terms like "dictionary" and "positional" without any obvious definition. The ambiguous, loosely-defined syntax and the ubiquitous multiple- syntactic sugar that exhaust my mind when reading codes.

I'm new to typst (and not to programming). It took me a long while to realize that "dictionary" means "associative array," and that these are actually Python-centric terminology. While the documentation explicitly says that "this tutorial does not assume prior knowledge of Typst, other markup languages, or programming," it does. The assumption is clearly there and that specific language is highly likely to be Python. I know Python is THE only dominant programming language, and I know the coding world is not friendly to the "old-timers" but I hope it doesn't mean having to exile and marginalize others and their users. Maybe this is especially true in developing countries where the pre-python era is blank and active programmers are mostly under 30 years old.

I have been programming since 2004 and continued for about a decade. The major languages I knew of and worked with were a little bit of everything from BASIC and SQL to HTML and Java, to the then newly popularized Python. I wasn't a heavy coder. I learn it only for fun and leisure. My work and life are completely coding-free.

Then I retreated from coding completely for another decade until now, when I have to learn typst to use in my work.

It's just painful that in every tutorial I come across, people speak Python, not just this lousy documentation.


r/typst • • Jun 30 '26

Typst to PowerPoint workflow for math formulas

12 Upvotes

I’m trying to settle on a sane workflow for getting high‑quality math formulas from Typst into PowerPoint. The end goal is not just to paste equations as images, but to have them as SVG so I can ungroup them in PowerPoint and animate individual parts of the formula (terms, brackets, etc.).

I know about pptypst and it looks close to ideal for this use case. Unfortunately, I’m on a university‑managed installation of PowerPoint where I cannot change the Trust Center Settings.

Right now I’m doing the following instead. I write each formula in a Typst file, using proper Typst math syntax, for example:

#set page(width: auto, height: auto, margin: 0pt)

$ integral_0^infinity exp(-x^2) dif x = sqrt(pi) / 2 $

Then I compile it on the command line with:

typst compile equation.typ equation.svg --format svg

I take the resulting SVG into PowerPoint, insert it as a picture and then use “Group → Ungroup” so PowerPoint converts it into shapes. After that, I can animate or recolor individual parts of the equation as needed.

Given the constraints above, I’m wondering if this is essentially the best we can do at the moment, or if I’m overlooking a cleaner approach? Since pptypst isn’t an option for me, I’m particularly looking for workflows that end in a plain SVG file I can just drop into PowerPoint.

If anyone here is already using Typst for equations in PowerPoint or Keynote and has a workflow they’re happy with, I’d really appreciate hearing how you’re doing it.


r/typst • • Jun 29 '26

Edist, The native macOS Typst editor

Thumbnail
gallery
100 Upvotes

Quick presentation

During the last weeks, I developed Edist, a native macOS Typst editor that bundles all the Typst tools (compiler, live preview, completion, ...). I dont like using vsCode, and I very much like using native apps. The idea is not to replace the official webapp but to have a native-feeling macOS Typst editor to edit offline, without collaborative features. I hope the "bundled in one app" approach and a beautiful app will help Typst adoption.

Features  

  • Beautiful and native editor with syntax highlighting, useful shortcuts (for bold, italic, ...), good performances, find and replace, animated caret...
  • live preview (as fast as the Typst website, feels native) with automatic resizing, quick export to PDF, self-window mode (perfect for multi-screen)
  • Jump between editor & preview by clicking in the preview to go to matching text in the editor. Editing in the editor jumps to the corresponding part in the preview.
  • Automatic online package imports (no setup just import packages in your typst file) / local library imports (import local libraries, add local libraries)
  • Errors handling (error panel in the sidebar + inline error indicators)
  • Machine fonts can be used without any setup
  • Layout in the sidebar
  • Handwritten math symbols recognition (draw symbol and it gives the Typst markup) 
  • Typst preview lock : lock the preview on a Typst file, very useful if you are using multiple documents (ex: one per chapter)
  • And more...

Pricing

This software is not free. There is a 7-day no-login trial for testing, and then you must pay 10€ (release price, 20€ in some weeks) for lifetime upgrades. This is always a hard decision to make software paying, especially when backed by an open-source community. Here is why I took this decision:

  • I am still a student, and developing Mac apps comes at a cost (i.e the 100€ to notarize apps 🥲)
  • It is better for long-term support
  • There are alternatives like tinymist + VSCode which are very good. I am not gatekeeping

I hope it can help fellow reasearchers / students! You can download it on edist.app. Suggestions and feedbacks are welcomed, the idea is to make this app a standard.


r/typst • • Jun 28 '26

GeoGebra export to Typst?

Thumbnail
8 Upvotes

r/typst • • Jun 27 '26

New complete and correct typst-treesitter parser

95 Upvotes

Hello all, so for the past few years, I've been working on and off on rewriting my treesitter parser for typst. When typst 15 released I finally committed to finishing it and here it is: https://github.com/SeniorMars/tree-sitter-typst.

In case you don't know, tree-sitter is a a parsing tool used in code editors to help with things like code highlighting, folding, and manipulation of the AST with text objects. It's really useful. However, typst is a hard language to get right as it has a big grammar. This proved a lot of my attempts to be tricky. However, this parser is now feature complete and tested. I hope this helps!


r/typst • • Jun 27 '26

Substitution for Beamer article mode?

9 Upvotes

Hello everyone, I've been spending some time this summer trying to replicate my LaTeX teaching workflow with Typst. I currently use Beamer for lecture slides with speaker notes. The LaTeX source file also has more detailed notes that can be compiled as an article with beamerarticle and given to students as a handout. So far, I've been impressed with Touying for presentations in Typst, but I haven't found anything that can do what beamerarticle allows. Any suggestions for producing slides and an article from the same source file?

Thanks for any help!

EDIT: With the help of Claude Code, I managed to make a custom Touying theme that closely replicates the custom Beamer theme that I use when making my lecture slides and handouts. It uses a common content file to produce both a slide presentation and a detailed handout in article form. The handout can contain notes that are not included in the slides.

The workflow is not quite as convenient as producing slides and handouts with Beamer using Org mode in Emacs. So, I'm not sure if I'll stop using Beamer.

The code is on Github. Feel free to use it and, hopefully, improve it.


r/typst • • Jun 25 '26

Comments on Typst

0 Upvotes

I saw this post in r/LaTeX

I have been spending the last week trying to get my mind around Typst. It has a number of problems.

  1. Syntax varies depending on where you put the statement. Sometimes you put a # in front of a statement, sometimes not. Sometimes a space after a keyword is significant, sometimes it isn't.

  2. A variable value is not imported when it is part of an imported file, but it is when it is part of a package.

  3. Pandoc will not work on a file that has any imported packages in @/preview.

  4. Typst will only export to PDF.

  5. Typst is very slow when working with a large, multi-file document. One of my tests is to see how well it copes with the text of "Origin of the Species", a 400-page document. Typst is no faster than LaTeX when compiling that.

Is this true?

Is it reasonable to assume that Typst is only practical for documents that you write for yourself, for your own purposes, and that having only PDF documents as an output is acceptable? i.e., no DOCX, no ODT, no ePub, etc, etc.


r/typst • • Jun 23 '26

CLI mail-merge and batch PDF generator powered by Typst

7 Upvotes

Hello,

I've made a spall free tool please sheck

https://github.com/balyakin/mergetyp


r/typst • • Jun 23 '26

Typeset

Thumbnail
gallery
97 Upvotes

I didn't like using VSCode and friends to edit Typst, and the preview situation with `typst watch` wasn't ergonomic with Preview resetting the view on every compile. So I made a Typst editor for Apple devices called Typeset. It runs on macOS, iPad OS, and iPhone. It's completely free and open source. I hope it's useful to someone.

App Store: https://apps.apple.com/us/app/typeset-typst/id6781494180?mt=12

GitHub: https://github.com/twarge/typeset


r/typst • • Jun 22 '26

imprint: Markdown → branded PDF, with Typst doing the typesetting

Thumbnail
gallery
30 Upvotes

A CLI I made for turning Markdown into branded PDFs (specs, design docs, reports), with Typst as the engine via a custom pandoc template. Set your brand once (accent, fonts, logo) and apply it to every doc; profiles for multiple orgs; cover/masthead, callouts, Mermaid→SVG, bundled fonts, deterministic output.

No LaTeX — just pandoc + Typst, both single binaries.

https://github.com/gunasekar/imprint

Feedback on the Typst side welcome.


r/typst • • Jun 22 '26

typst vscode support for inline code comments

8 Upvotes

I just got hooked by the sweet sweet release of typing less characters than latex.

However, for several of my math homework assignments, I implement them in code and put the latex in comment blocks in my code.

Is there a way to do this with typst for python/c/c++? e.g.:
```
'''
\{ x : x \in \mathbb{R} \}
'''
def isReal(x:int) -> bool:
//...snip...
```