Skip to content

8LWXpg/jupyter2typst

Repository files navigation

Jupyter to Typst converter

Feel free to open a issue or PR!

Features

  • automatic image download/extract
  • nice template
  • support for KaTeX in markdown math (mostly complete)

Look for demos in test folder.

Install

Download binary from release page

Or

Install with cargo:

cargo install --git 'https://github.com/8LWXpg/jupyter2typst.git'

After that, you can use jupyter2typst in your terminal.

Template

The output .typ file imports a template file. It is required to have a template.typ file in the same directory as the output .typ file.

Check the template list for templates others have made.

Download the template file:

curl 'https://raw.githubusercontent.com/8LWXpg/jupyter2typst/master/template/template.typ' > template.typ

modify the template.typ to fit your needs.

Usage

jupyter2typst <input> [-o <output>] [-i <img-path>]
  • input: the path of the input .ipynb file
  • output: the path of the output .typ file
  • img-path: the path of the image folder, default is ./img

Contributing

Adding a template

  1. Create a new template file <template-name>.typ in the template folder
  2. Add simple description in template/template.md
  3. submit a PR with a preview image of template/base.typ compiled with the new template

KaTeX support list

read convert_list.md