markdown-katex-rs
A fast, Rust-backed KaTeX extension for the Python Markdown library.
This project aspires to be a drop-in replacement for mbarkhau/markdown-katex. The main difference is, instead of shipping node and katex binaries, it's using the katex-rs crate via PyO3 for significantly improved rendering performance and smaller distribution size.
Requirements
- Python 3.10+
Installation
Once the package is published to PyPI, you can install it using uv (recommended) or pip:
uv add markdown-katex-rs
Usage
Use it just like any other Python Markdown extension. It supports both inline math ($ or $``) and block math (fenced math` code blocks).
import markdown
from markdown_katex_rs import KatexRsExtension
text = r"""
This is inline math: $`a^2 + b^2 = c^2`$
This is block math:
```math
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
"""
Render with the KatexRsExtension
md = markdown.Markdown(extensions=[KatexRsExtension()]) html = md.convert(text)
print(html)
## Local Development & Building
The project requires `uv` for Python dependency management and `cargo` / Rust for compiling the PyO3 extension.
```bash
# Clone the repository
git clone <your-repo-url>
# Setup your env and build the development wheel automatically
uv sync
# Run tests
uv run pytest -v
CI/CD and Publishing
This project is configured with GitHub Actions to:
- Automatically run the PyTest suite on every pull request or push to
main. - Build cross-platform binary wheels via
maturin-actionand push them to PyPI seamlessly whenever a new GitHub Release is created.
To trigger a release to PyPI:
- Update your version bumps in
Cargo.tomlandpyproject.toml. - Create and publish a new Release in the GitHub UI (i.e.,
v0.1.0). - The Action will automatically execute and handle the heavy lifting of publishing.
(Note: The wheel filename will vary depending on your OS, Python version, and system architecture.)
Metadata
Release files for markdown-katex-rs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 14.8 MB
Release files / markdown_katex_rs-0.1.0-cp314-cp314-win_amd64.whl
| Download URL | markdown_katex_rs-0.1.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 869.1 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a7ddf0681a48dae9c1d6cdd05d61fa13e419b025346d6c1b7c815d5838360db4
|
|
BLAKE2b-256 checksum How to use checksums |
10930181df759f86d1c58e9c9202e72e81248e4a6ae0c677444ce62249b5a473
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | markdown_katex_rs-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
c59ca37ed8fd9d1d7538a8f76d36873ca9f3022014d92a488da6de958fdcae9f
|
|
BLAKE2b-256 checksum How to use checksums |
6ba16db043738458ee0b69f45170d68727836b86533a3ae034616b882bd2ee79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | markdown_katex_rs-0.1.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 998.6 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d615422d42f78ed2a03006455cddfe7c61bf75abf45f840c654a96d5df69e76
|
|
BLAKE2b-256 checksum How to use checksums |
7669f357cfeffbcb32ffd3351506e713dd74dbc477fef994796abb832cf96cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | markdown_katex_rs-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 869.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6b6bfde15dd2e596d6418aded606f1b1e6431d48b0840a6fc6c93d782c930fe6
|
|
BLAKE2b-256 checksum How to use checksums |
14a5f34c7efe03a3d7beb0b10219cee040ad17879f8bcbc5d55d76b73d5ab995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | markdown_katex_rs-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
c84991ec59d2ccccbef125af8baf4d1414a4438e30342f3cd54845db0514e64a
|
|
BLAKE2b-256 checksum How to use checksums |
82f35ed841d188777977614c7dd2da22f7d55f7afecba0765ff2d0943e0427c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | markdown_katex_rs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 998.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
95cfa837d666f0d6ee884cf8976d55e6e5ca7e17dbfe93ea5122287011293ff0
|
|
BLAKE2b-256 checksum How to use checksums |
1ae3daa0d663dd07d1b045da67e98ec2c353a43bbe1d1dc6c62908860f845832
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | markdown_katex_rs-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 869.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
603c795fe11df04a44aef78e92ade961f211ebb0d928982186a27b882acce9e4
|
|
BLAKE2b-256 checksum How to use checksums |
f6187a6888257cf3f3f2f70247ce20fa310e00aa8a0dfad1962e9054ba7b5952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | markdown_katex_rs-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
5f3dcdd9dda28a3bff8fd6d139e06ff12ad4ea7d01ab43dd0ddc591a7fb9971b
|
|
BLAKE2b-256 checksum How to use checksums |
3454eca87a69433a9f76f9219990481089b7945988bd2a1ef2e71fd4b20d7965
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | markdown_katex_rs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 999.4 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
55359e730237cb8fd0b5638a9555c3841abb25bb04cf07d26b768a60ba5d47ac
|
|
BLAKE2b-256 checksum How to use checksums |
fe067d93f280278f3e95e9e5fefe5a34fbecd06f3203298d31f7e195331b81a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | markdown_katex_rs-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 870.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a3b388530a99344543c70c54ef7df07ac5807d69e22dce812f5226450060563e
|
|
BLAKE2b-256 checksum How to use checksums |
34b928c8652e24f8192a6edef734789223ad5299f7164b84877d55bff64c064d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | markdown_katex_rs-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
b33b798500555f11ccbd7a1e54365e7b6247e2d56030ad099b237d933e5c339a
|
|
BLAKE2b-256 checksum How to use checksums |
e502ba62a911e63d498414ac01b6e17c0add15f3856c02d7d0169df802ac59c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | markdown_katex_rs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
65b16741530503f411ad9ea5f7e6abb0af6839916c8ad343a2a7c83eb0704a9e
|
|
BLAKE2b-256 checksum How to use checksums |
3d598fbcc2b1cee9ca251a3cebefaea1654a98f5ba4ba64e103bd06ebce0fcd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | markdown_katex_rs-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 870.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
00eedc63c6ceea4b51a12000e6c3eae3d8d9f718689d53876e620b407a21d77c
|
|
BLAKE2b-256 checksum How to use checksums |
809306f558fbaf2cf1b35d25bed055f7d36c1872865eb69cb208508a67cccaa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | markdown_katex_rs-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
dab02cf421a8fdd6a85ab5caa56a44c3ae808736210cd1019e746a839798a6fa
|
|
BLAKE2b-256 checksum How to use checksums |
5c3144bd7a870aa6becde14bfc53f72058d8183caaf565c63883b7b2c3ad228e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency logRelease files / markdown_katex_rs-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | markdown_katex_rs-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8e0631e11c6ed532fc08df53355875fadd0b5e919bc7f9ed063e5282d386e685
|
|
BLAKE2b-256 checksum How to use checksums |
18fbb4835adf8445464b67b2a267a6d56b53e34c61c51480d741ba7d0545d645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 22, 2026.
Transparency log