A Typst package for reading and exporting Jupyter notebooks. It covers various use cases:
- Rendering: Convert a notebook to PDF using Typst styles.
- Extraction: Use the outputs of notebook cells in your document.
- Execution: Execute code from Typst raw blocks and include the results in the document.
Render a full notebook:
Or include the notebook as a section of a larger document:
#import "@preview/callisto:0.3.0"
#set heading(numbering: "1.")
= Introduction
Some text.
#callisto.render(
nb: path("notebook.ipynb"),
theme: "neat",
cmarker: (h1-level: 2), // subsection
(0, 1),
) |
|
For each kind of item there's a function to extract it:
Export code blocks to a Jupyter notebook and render the results:
The export is done with typst eval, the execution with jupyter-nbconvert (see Export and Execution tutorial below).
You can share the exported notebook together with your Typst file, it's all one needs to recompile the document.
The following tutorials are meant to be read in order:
See the reference manual for all functions, available settings and additional examples.
Here are some alternatives for the "execution" use case:
-
Quarto: An amazing system for producing PDF, HTML and more from Markdown sources that include executable code blocks. Can use Typst as PDF backend.
-
Calepin: A tool that works like a mini Quarto, where you write input files in Typst instead of Markdown.
-
Jlyfish: Typst and Julia packages that work together to execute Julia code blocks from Typst documents.
-
Prequery A more generic approach to getting data out of a Typst document and back in after some processing. Can be used for executing code blocks.



