HN Debrief

Gribouille 0.3.0: A Grammar of Graphics for Typst

  • Programming
  • Developer Tools
  • Open Source
  • Design
  • Education

The post announces Gribouille 0.3.0, a package written in native Typst that lets users build charts with a Grammar of Graphics style API, clearly borrowing ideas from ggplot2. That matters because Typst has been gaining attention as a modern programmable typesetting system, and charting is one of the missing pieces if you want to keep report generation, layout, and figures inside one toolchain instead of bouncing between Python, R, LaTeX, and vector editors.

If you produce reports, papers, or other generated PDFs, Typst is now building out a real plotting stack and is worth a serious trial. Do not assume that means it replaces markdown, desktop design tools, or entrenched LaTeX workflows without friction.

Discussion mood

Mostly positive and curious. People liked seeing a serious plotting package appear in Typst and used it as a proxy for a bigger conversation about Typst’s momentum, with enthusiasm strongest from users burned by LaTeX and skepticism centered on adoption inertia, markdown’s plain-text niche, and practical ecosystem gaps.

Key insights

  1. 01

    Why ggplot-style plotting still wins

    Layered plotting is the point, not just the syntax resemblance. The appeal of a Grammar of Graphics API is that you stop thinking in disconnected chart functions and instead compose data mappings, visual encodings, scales, and layers into one model, which is why people coming from matplotlib often find ggplot2 or Plotnine far more expressive for complex figures.

    If your team generates many nontrivial charts, evaluate whether a compositional plotting model would reduce custom glue code across report types. The win is biggest when charts evolve often or need consistent styling across many outputs.

      Attribution:
    • stdbrouw #1
    • mightyham #1
    • Arodex #1
  2. 02

    Academia will hinge on templates and gatekeepers

    Better syntax is not enough to dislodge LaTeX in universities. Adoption will move through thesis templates, younger users, and painful niches like diagramming where people already hate TikZ, but hard constraints like arXiv support and existing institutional templates still decide what can ship in practice.

    If you want Typst inside a research or publishing workflow, start by replacing one template or one figure pipeline, not by pitching a total migration. Check submission and archive requirements first, because those can nullify any authoring advantage.

      Attribution:
    • cryo32 #1
    • k2enemy #1
    • Stone515 #1
    • cozzyd #1
    • adamnemecek #1
    • lkm0 #1
  3. 03

    Markdown and Typst serve different jobs

    The sharpest framing was that markdown competes with plain text, not with full typesetting systems. Typst becomes attractive once you need code, reusable styling, numbering, footnotes, data-driven content, and polished layout, but those same powers make it a worse fit for files that people expect to read raw in a terminal or edit casually in any text box.

    Keep markdown for lightweight docs and collaboration surfaces where raw readability matters. Move to Typst only when document complexity is already forcing you into extensions, generators, or layout hacks.

      Attribution:
    • sbysb #1
    • mastermage #1
    • josephg #1
    • red_admiral #1
    • eikenberry #1
  4. 04

    Typst is not a free-form design tool

    For flyers, posters, and foldable print pieces, Typst works when the job is still fundamentally structured text with repeatable layout. Once placement becomes highly visual and ad hoc, tools like Inkscape, Figma, or Illustrator are still the better choice, even if Typst can cover some poster and card templates.

    Use Typst for templated collateral and content-heavy one-pagers. For marketing assets with pixel-level composition, keep a real page layout or vector design tool in the stack.

      Attribution:
    • ink_13 #1
    • flexagoon #1
  5. 05

    Typst’s architecture may trade simplicity for memory

    One technically informed note pointed out how far Typst is from TeX under the hood. TeX was built for tiny machines, while Typst memoizes function results aggressively, which can consume all available memory on large documents or during editing. That makes pure-Typst plotting elegant, but it raises real scaling questions for figure-heavy work.

    Before standardizing on Typst for large generated documents, benchmark memory and compile behavior with your actual workloads. Small demos are not a good proxy for a 200-page report with dozens of charts.

      Attribution:
    • kzrdude #1
    • elsoja #1

Against the grain

  1. 01

    LLMs may blunt syntax advantages

    If code assistants are writing most of the document language for you, then a cleaner syntax stops being a decisive edge. On that view, Typst’s biggest selling point over uglier systems like LaTeX shrinks as generation tools hide the rough parts of older formats.

    Do not justify a migration on authoring ergonomics alone if your workflow is becoming AI-assisted. Weigh export compatibility, ecosystem maturity, and reviewability more heavily.

      Attribution:
    • KolmogorovComp #1
  2. 02

    Writers may prefer markdown over live typesetting

    One sustained pushback came from a writer’s perspective rather than a programmer’s. The argument was that serious composition often benefits from a deliberately plain, low-friction text format that preserves structure and survives translation, ebook conversion, and custom processing, while embedding a programmable typesetting language into the source makes those workflows harder rather than easier.

    If your documents must move across translation, ebook, HTML, and editorial pipelines, test Typst against those downstream needs before adopting it as an authoring format. A better PDF workflow can still be the wrong upstream format.

      Attribution:
    • applicative #1 #2 #3

In plain english

aes
In ggplot-style plotting, short for aesthetic mappings, which connect data fields to visual properties like position, color, or size.
arXiv
A large online repository where researchers post academic preprints, especially in math, physics, and computer science.
ggplot2
A popular R plotting library based on the Grammar of Graphics.
Grammar of Graphics
A way of building charts by combining reusable pieces like data mappings, scales, layers, and visual marks instead of calling separate chart-specific functions.
HTML
Hypertext Markup Language, the standard format for web pages shown in browsers.
labs
In ggplot-style plotting, a function used to set chart labels such as titles and axis names.
LaTeX
A document preparation system built on TeX that is widely used for technical and academic writing.
Markdown
A plain-text markup format that is easy for humans to write and often easier for software to parse than HTML.
matplotlib
A widely used Python plotting library, known for broad capability but often seen as verbose.
Plotnine
A Python plotting library that imitates the ggplot2 API.
Python
A general-purpose programming language commonly used for scripting, data work, and software development.
R
A programming language widely used for statistics, data analysis, and plotting.
README
A plain-text or lightly formatted file that explains a software project, usually shown first in a repository.
SVG
Scalable Vector Graphics, a text-based image format for vector graphics.
TeX
The underlying typesetting system and macro language that LaTeX is built on.
TikZ
A LaTeX package for creating diagrams and graphics programmatically.
Typst
A modern markup and programming language for creating formatted documents, often presented as an alternative to LaTeX.
WebAssembly
A low-level binary format that lets code run in web browsers at near-native speed.

Reference links

Story and package references

Related plotting systems

  • ggplot2 labs reference
    Used to explain why the package keeps ggplot-style naming like `labs`.
  • Observable Plot
    Mentioned as a possibly closer API influence than ggplot2.
  • Plotnine
    Cited as a ggplot-like plotting option for Python users who dislike matplotlib.

Typst packages and ecosystem

  • poster-syndrome
    Given as an example of using Typst for poster-style layouts.
  • keepsake
    Given as an example package for foldable cards and printable layouts.
  • Typst roadmap
    Linked to show planned EPUB export and broader output ambitions.
  • Zero Practal
    Referenced in a side discussion about separating plain syntax from presentation layers.

Examples and projects