# \[ANN\] DocumenterTypst.jl - Fast PDF Generation for Documenter.jl via Typst

**URL:** https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772
**Category:** Package Announcements
**Tags:** package, documentation, pdf, typst
**Created:** [December 28, 2025, 10:03am UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772 "2025-12-28T10:03:31Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 10:03am UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/1 "2025-12-28T10:03:31Z")

</div>

* * *

**TL;DR** : A new Documenter.jl backend that generates professional PDFs **10x faster** than LaTeX, with zero setup required.

* * *

Two years ago, I shared [an early experiment](https://discourse.julialang.org/t/building-julia-documentation-using-typst/) with using Typst as a backend for Documenter.jl. Today, I’m excited to announce that **DocumenterTypst.jl v0.1** is ready for production use!

## 🚀 Speed Comparison

Building the complete Julia documentation (2000+ pages, see [here](https://drive.google.com/file/d/1Ms9HTO9FvqpRuMdpcRFwj4ujl2GZWy6i/view?usp=sharing)):

- **Typst backend (2 years ago)**: ~13 minutes (on Intel i9-9900K)
- **DocumenterTypst.jl today** : **\< 60 seconds** (on Apple M4 Max)

```julia-auto
┌ Info: TypstWriter: AST conversion completed.
└ time = "0.97s"
[ Info: TypstWriter: compiling Typst to PDF (Typst_jll)...
┌ Info: TypstWriter: Typst compilation completed.
└ time = "47.06s"
┌ Info: TypstWriter: optimizing PDF with pdfcpu...
└ size_before = "61.28 MB"
┌ Info: TypstWriter: PDF optimization completed.
│ size_after = "21.12 MB"
│ reduction = "65.5%"
└ time = "5.82s"

```

**Want to try it yourself?** Check out our [step-by-step guide](https://github.com/lucifer1004/DocumenterTypst.jl/blob/main/scripts/README.md) for building the Julia documentation with the Typst backend. It’s as simple as:

```bash

julia scripts/build_julia_docs.jl

```

## ✨ What’s New Since the Prototype

The package is now **feature-complete** and ready for production:

✅ **Full Markdown support** : All Documenter features work out of the box

- Code blocks with syntax highlighting (Julia fully supported!)
- Tables, images, cross-references
- Admonitions, footnotes, block quotes
- Nested lists and complex layouts
- **NEW** : Pure Typst files (`.typ`) can be mixed with Markdown sources

✅ **Math rendering** : Two options for maximum compatibility

- LaTeX math via [mitex](https://github.com/mitex-rs/mitex) (backward compatible)
- Native Typst math syntax (for new projects)

✅ **Zero setup required** : Uses Typst\_jll for automatic installation

- No LaTeX distribution needed
- Works on Windows, macOS, and Linux
- Perfect for CI/CD pipelines

✅ **Optimized output** : Automatic PDF compression

- **NEW** : Built-in PDF optimization using pdfcpu (65%+ size reduction for large docs)
- System font control to avoid emoji font bloat
- Detailed timing for performance monitoring

✅ **Customizable styling** : Easy template system

- Override colors, fonts, and layouts
- Create custom title pages
- See [styling guide](https://lucifer1004.github.io/DocumenterTypst.jl/stable/manual/styling/)

## 📦 Installation & Usage

~~**Note** : DocumenterTypst.jl is not yet registered in the General Julia Registry. Install from source:~~

DocumenterTypst.jl is available now!

```julia
using Pkg
Pkg.add("DocumenterTypst")

```

```julia
using Documenter
using DocumenterTypst
makedocs(
  sitename = "MyPackage",
  authors = "Your Name",
  format = DocumenterTypst.Typst(), # That's it!
  pages = [
    "Home" => "index.md",
    "Guide" => "guide.md",
  ]
)

```

## 🎯 Why Typst?

Compared to LaTeX:

- **Faster** : Compilation in seconds, not minutes
- **Simpler** : No TeX distribution installation
- **Modern** : Clean syntax, better error messages
- **Reliable** : Reproducible builds with Typst\_jll

## 📚 Resources

- **Documentation** : [https://lucifer1004.github.io/DocumenterTypst.jl/](https://lucifer1004.github.io/DocumenterTypst.jl/)
- **Repository** : [GitHub - lucifer1004/DocumenterTypst.jl](https://github.com/lucifer1004/DocumenterTypst.jl)
- **Build Julia Docs Yourself** : [Step-by-step guide](https://github.com/lucifer1004/DocumenterTypst.jl/blob/main/scripts/README.md)
- **Example Output** : [Julia Documentation PDF](https://drive.google.com/file/d/1Ms9HTO9FvqpRuMdpcRFwj4ujl2GZWy6i/view?usp=sharing) (2000+ pages, built in \< 60s)

## 🙏 Acknowledgments

Built on top of [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl) and powered by [Typst](https://typst.app/). LaTeX math rendering via [mitex](https://github.com/mitex-rs/mitex).

Special thanks to the Documenter.jl team for their excellent plugin architecture, and the Typst team for creating such a fast and reliable typesetting system.

## 🔮 Future Plans

- Julia General Registry registration (coming soon!)
- Template gallery with pre-made styles
- Additional Typst-native features
- Performance optimizations for very large documents
- Your suggestions!

* * *

**Try it out and let me know what you think!** Bug reports, feature requests, and contributions are all welcome at [GitHub - lucifer1004/DocumenterTypst.jl](https://github.com/lucifer1004/DocumenterTypst.jl)

* * *

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [December 28, 2025, 2:03pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/2 "2025-12-28T14:03:03Z")

</div>

Hi,

do you mind to share an example of the typst based Julia manual?

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 2:13pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/3 "2025-12-28T14:13:42Z")

</div>

I already pasted the Google Drive url in the original post.

---

<div class="post-metadata">

### Author: ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)
#### Post date: [December 28, 2025, 2:44pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/4 "2025-12-28T14:44:50Z")

</div>

I’ve missed that.

You should note the huge size difference. Your example is 100MB, whereas the original Julia docs pdf is ~8MB.

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 3:15pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/5 "2025-12-28T15:15:46Z")

</div>

A possible cause is that I did not do label hashing in this version to ensure no coliision. I would do another experiment to check the effect on the final file size.

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 3:43pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/6 "2025-12-28T15:43:07Z")

</div>

Key issue seems to be embedded fonts.

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 4:14pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/7 "2025-12-28T16:14:34Z")

</div>

- Original: 100 M
- System font disabled: 60 M
- Codly disabled (using default codeblock rendering instead of the fancier one): 40 M
- `pdfcpu` postprocessing (very fast, ~2s): 15 M

---

<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: [December 28, 2025, 7:15pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/8 "2025-12-28T19:15:55Z")

</div>

As of 2025-12-28, this doesn’t appear to have made it to the registry, even after `Pkg.Registry.update()`. Will definitely check back in a few.

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 28, 2025, 11:04pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/9 "2025-12-28T23:04:02Z")

</div>

Ah, yes, sorry for not mentioning this.

The PR [New package: DocumenterTypst v0.1.0 by JuliaRegistrator · Pull Request #145159 · JuliaRegistries/General · GitHub](https://github.com/JuliaRegistries/General/pull/145159) has not been auto-merged yet.

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [December 31, 2025, 8:54am UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/10 "2025-12-31T08:54:15Z")

</div>

It is available now!

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [January 12, 2026, 3:26pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/11 "2026-01-12T15:26:21Z")

</div>

v0.1.1 has been merged and DocumenterCitations.jl has been supported!

---

<div class="post-metadata">

### Author: ![andreeco](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@andreeco](https://discourse.julialang.org/u/andreeco)
#### Post date: [January 12, 2026, 7:47pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/12 "2026-01-12T19:47:50Z")

</div>

I tried the extension you added, and it worked for generating PDF output! Thanks for implementing it and being so responsive.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [January 12, 2026, 8:31pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/13 "2026-01-12T20:31:13Z")

</div>

The LaTeX command `\mathscr` doesn’t seem to be supported in math blocks

---

<div class="post-metadata">

### Author: ![lucifer1004](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucifer1004/32/22311_2.png) [@lucifer1004](https://discourse.julialang.org/u/lucifer1004)
#### Post date: [January 12, 2026, 9:53pm UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/14 "2026-01-12T21:53:49Z")

</div>

See [feat: support missing commands by Shichien · Pull Request #214 · mitex-rs/mitex · GitHub](https://github.com/mitex-rs/mitex/pull/214).

This should be resolved after next release of mitex.

---

<div class="post-metadata">

### Author: ![Al3cLee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/al3clee/32/218582_2.png) [@Al3cLee](https://discourse.julialang.org/u/Al3cLee)
#### Post date: [April 3, 2026, 9:51am UTC](https://discourse.julialang.org/t/ann-documentertypst-jl-fast-pdf-generation-for-documenter-jl-via-typst/134772/15 "2026-04-03T09:51:45Z")

</div>

Hi, just wanted to drop by and thank you (also to provide a usecase) for the awesomeness that is DocumenterTypst.jl. I wanted to learn the package TensorKit.jl with very complicated math expressions and unicode symbols in its 200+ pages (seen from a PDF) of docs, and your package compiled it within 3 minutes. I tried every way Documenter.jl provided to compile a PDF but none worked, probably due to missing character problems.
