Typst Support in XenT: Current State and Limitations
XenT includes experimental Typst support as an alternative content format. This post provides an honest evaluation of its current state to help you decide whether to use it.
What is Typst?
Typst is a modern markup language designed as a more approachable alternative to LaTeX, with a cleaner syntax and better scripting capabilities. It aims to combine the precision of LaTeX with the ease of Markdown.
Strengths
Superior Scripting Language
Typst’s scripting language is significantly more intuitive than LaTeX:
// Typst - clean, modern syntax
#let colors = (red, blue, green)
#for color in colors [
This text is #text(fill: color)[colored].
]
// vs LaTeX - arcane syntax
\foreach \color in {red,blue,green}{%
This text is \textcolor{\color}{colored}.%
}
The language feels like a modern programming language rather than macro expansion tricks.
Excellent Math Typesetting
Typst’s math rendering is professional-grade and arguably more intuitive than LaTeX:
// Inline math
The equation $E = m c^2$ revolutionized physics.
// Display math with natural syntax
$
f(x) = integral_(-oo)^oo hat(f)(xi) e^(2 pi i xi x) dif xi
$
The syntax is cleaner (no backslashes), and the output quality matches LaTeX.
Critical Limitations in XenT
No Native Astro Integration
Typst content in XenT goes through a custom integration that has significant restrictions:
Component Support: Unlike MDX, you cannot use Astro components in Typst files. No Gallery, no Image optimization, no YouTube embeds. Typst files are isolated from the component ecosystem.
Image Handling: While Typst supports images natively, they don’t benefit from Astro’s image optimization pipeline (no automatic AVIF/WebP conversion, no responsive sizes).
No MathML Export
This is the most critical limitation. Typst currently only exports math as SVG or raster images, not MathML. This means:
- RSS Feed Incompatibility: Math equations in Typst posts don’t render properly in RSS readers (unlike Markdown+KaTeX which converts to MathML)
- Accessibility Issues: Screen readers can’t interpret SVG math
- Search Engine Limitations: Math content isn’t indexable as text
In contrast, XenT’s Markdown math rendering (via KaTeX/MathJax) produces proper MathML that works everywhere.
Tooling Immaturity
The Typst ecosystem is young:
- Alpha-stage packages:
@myriaddreamin/typst-ts-*are at version 0.6.1-rc3 (release candidate) - Verbose HTML output: The generated HTML is bloated compared to Markdown
- Limited syntax highlighting: Code blocks lack the polish of Shiki-rendered Markdown
- Breaking changes expected: The API will likely change as it matures
When to Use Typst
Consider Typst if:
- You’re writing math-heavy content and prefer Typst’s syntax
- Your content is standalone (doesn’t need components or image optimization)
- You don’t need RSS feed compatibility
- You’re okay with experimental tooling
Use Markdown/MDX instead if:
- You need component support (Gallery, YouTube, etc.)
- You need RSS feed compatibility
- You want optimized image handling
- You prioritize stability and ecosystem maturity
Recommendation
For most users, MDX is the better choice. It provides:
- Full component ecosystem
- Excellent math rendering with RSS compatibility
- Mature, stable tooling
- Image optimization
- Better integration with Astro
Typst support in XenT is experimental. It’s included to support the technology’s future, but it’s not production-ready for general use. The limitations aren’t XenT’s fault—they’re upstream issues that will hopefully be resolved as Typst matures.
Future Outlook
Typst shows promise, but it needs:
- MathML export support
- Cleaner HTML output
- Stable 1.0 release of compiler tooling
- Better integration paths with web frameworks
When these arrive, Typst could become a compelling alternative. Until then, treat it as an experimental preview rather than a production feature.
See Also:
- Math Rendering Guide - Production-ready math with KaTeX/MathJax
- Typst Test Document - Example Typst content