Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Writing Scientific Docs Using Typst

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Typst is a modern, open-source, markup-based typesetting system designed as a user-friendly and powerful alternative to LaTeX for creating high-quality documents, presentations, and equations, featuring fast compilation, integrated scripting, and intuitive syntax that blends Markdown-like simplicity with rich formatting capabilities. It handles complex tasks like math typesetting, bibliography management, and automation, making it great for scientific papers, theses, and reports. Below are key features of Typst.

Jupyter Notebook Support

pandoc your_notebook.ipynb -f ipynb -t typst -o output.typ
# or
quarto render your_notebook.ipynb --to typst

callisto is a Typst package for reading from Jupyter notebooks. It currently addresses the following use cases:

Python Support

https://github.com/messense/typst-py

#import "@preview/pyrunner:0.3.0" as py


#let some_code = ```
a = 1.3;
b = 2.5;
c = a * b;

def values(v):
  return globals().get(v)
```
#let some_compiled = py.compile(some_code);

#let get(v) = {
  float(py.call(some_compiled , "values", v))
}

Using $A = get("a")$, $B = get("b")$, $c = get("c")$