Skip to main content

Converter from DocTree of docutils to Typst source and PDF.

Overview

rst2typst is Python project that includes docutils custom writer and frontend CLI.

I develop this for two purposes:

  • To generate PDF documentation from reStructuredText rapidly.

  • To work as core of atsphinx-typst that it is Sphinx extension to generate PDF file on Sphinx lifecycle.

I will use this and atsphinx-typst to generate documentation PDF files of my Python projects.

Benchmark

rst2typstpdf is about 53.5x faster than rst2latex+pdflatex when including the installation of TeX Live (1.7 s vs 92.3 s).

For full details, see Benchmark in the documentation.

Usage

Use CLI

You write reStructuredText source to generate for PDF using Typst. (e.g. this filename is document.rst.)

==================
rst2typst document
==================

Overview
========

We like reStructuredText! It is an one of great docutils.

* This has custom writer of docutils.
* This has CLI endpoint named ``rst2typst`` and ``rst2typstpdf``.

Usage
=====

Enjoy it!

You can run these command to convert to Typse code.

rst2typst document.rst document.typ

Generated document.typ has this content (actually this is not formated).

#title([rst2typst document])

= Overview

We like reStructuredText! It is an one of great docutils.

- This has custom writer of docutils.
- This has CLI endpoint named `rst2typst` and `rst2typstpdf`.

= Usage

Enjoy it!

Use as library

(TBD)

License

Apache-2.0 license. Please see LICENSE on repository.

Metadata

Release files for rst2typst 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rst2typst 0.6.0
File Size Uploaded
rst2typst-0.6.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rst2typst 0.6.0
File Interpreter ABI Platform
rst2typst-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.0 kB

Release files / rst2typst-0.6.0.tar.gz

Download URL rst2typst-0.6.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
27220902bafcf5decbf87ee6f07e84ce7c27db3917aaa3f617be7e06b86492c6
BLAKE2b-256 checksum
How to use checksums
8f087a959d02c86595cb48c2611462aef9cc1689f7f0aa38d7b86ed98a019103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release files / rst2typst-0.6.0-py3-none-any.whl

Download URL rst2typst-0.6.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
083278cf39c3eea1eed6f0b115c619eebd76ee9b8e121350e6d489687686a229
BLAKE2b-256 checksum
How to use checksums
1a8c238cc2e09714da3628479be43606ffdd3ca1e6dcb943642a1b2737ec03c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page