gitwtfhub

wtf is typstpp?

eternal-flame-ad/typstpp — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2024-07-26

RustAudience · researcherComplexity · 2/5StaleSetup · moderate

TL;DR

Typst++ runs Haskell or R code directly inside Typst documents so you get live data analysis and charts without copy-pasting results into your writing.

Mindmap

mindmap
  root((repo))
    What it does
      Runs R in Typst
      Runs Haskell in Typst
      Weaves output into PDF
    Tech stack
      Rust
      Typst CLI
      R and Haskell
    Use cases
      Data-driven reports
      Math computations inline
      Auto-generated charts
    Audience
      Researchers
      Students
      Data-driven writers
    Limitations
      Still developing
      Knitr args incomplete
      Haskell formatting WIP

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Include R-generated charts from datasets that update automatically when compiling a report.

REASON 2

Embed Haskell code in a paper to show a math computation and its result inline.

REASON 3

Mix R and Haskell code blocks in one document to produce tables, graphics, and text output.

REASON 4

Compile a Typst document once to get a final PDF with all code results woven in.

What's in the stack?

RustTypst CLIRHaskell

How it stacks up

eternal-flame-ad/typstpp0xr10t/pulsefi404-agent/codes-miner
Stars00
LanguageRustRustRust
Last pushed2024-07-26
MaintenanceStale
Setup difficultymoderatehardmoderate
Complexity2/54/53/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Typst, R, and Haskell to all be installed and available on your system path.

Wtf does this do

Typst++ is a tool that lets you run Haskell or R code directly inside your Typst documents. If you write reports, papers, or any document in Typst and want to include live data analysis, statistical calculations, or plots generated by R or Haskell, this tool bridges that gap. Instead of running your code separately and pasting results into your document, you keep everything in one file. At a high level, it acts as a middleman between you and Typst's normal compiling process. When you tell it to compile or watch your document, it first scans your Typst source file for any embedded R or Haskell code. It runs that code, captures the output (like tables or graphics), and weaves those results back into the document. Then it hands the combined file off to Typst to produce the final PDF, just like normal. This is useful for anyone doing data-driven writing. For example, a researcher writing a report could include R code that generates a chart from a dataset, when the document compiles, the chart appears automatically. A student could use Haskell to work through a mathematical computation inline, showing both the code and its result. It supports mixing R and Haskell in the same document, and can handle a blend of graphics, tables, and text output from your code. The project is still developing. A few planned features aren't finished yet, such as passing arbitrary arguments to R's knitr engine or simplifying how Haskell code blocks are formatted. It's built in Rust and wraps around the standard Typst command-line interface, meaning it integrates into existing Typst workflows rather than replacing them.

Yoink these prompts

Prompt 1
Help me set up Typst++ so I can embed R code in my Typst document. Walk me through installing it and writing my first code block.
Prompt 2
I have a Typst report and want to add a chart from an R dataset using Typst++. Write a sample Typst snippet that includes R code and explains how compilation works.
Prompt 3
Show me how to mix Haskell and R code blocks in the same Typst document so both results appear in the final PDF.
Prompt 4
I'm getting an error when Typst++ tries to run my Haskell block. Here is my code and error output, help me fix it.

Frequently asked questions

wtf is typstpp?

Typst++ runs Haskell or R code directly inside Typst documents so you get live data analysis and charts without copy-pasting results into your writing.

What language is typstpp written in?

Mainly Rust. The stack also includes Rust, Typst CLI, R.

Is typstpp actively maintained?

Stale — no commits in 1-2 years (last push 2024-07-26).

How hard is typstpp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is typstpp for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.