Fix TeX/LaTeX quirks in Markdown for KaTeX/MathJax (Python minimal).
Project description
TeXPatch (Python)
TeXPatch fixes small TeX/LaTeX quirks in Markdown so it renders cleanly in KaTeX/MathJax.
This is a minimal Python port with a safe, local transform and a CLI.
Install
pip install texpatch
Usage
API:
from texpatch import convert
print(convert('f(x)=|x|')) # f(x)=\lvert x\rvert
CLI:
echo "f(x)=|x|" | python -m texpatch
Notes:
- Guardrails: does not modify fenced or inline code.
- For fuller rule coverage see the JavaScript library
texpatch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
texpatch-0.1.1.tar.gz
(1.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file texpatch-0.1.1.tar.gz.
File metadata
- Download URL: texpatch-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efa067eeab8a02e365d79016d5baa6224794adf48b244b3db91ade5a527c5db6
|
|
| MD5 |
06f8fe52f6f8437f2f50a02bc0e2e6d2
|
|
| BLAKE2b-256 |
6e9d6b2decca14a257c880a158a6678631c1d3760bb51e9a9c8259e645e9b107
|
File details
Details for the file texpatch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: texpatch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfbec6ad0579d16f28217ea3cb10d41ff0da0b3c89db4e789a922c8aa5270dc5
|
|
| MD5 |
b3846f74a5fbf5ed2cb259ee1091b9d1
|
|
| BLAKE2b-256 |
9825d0913db04a46c52d2be20067da83cfbdc70da2e2d6b8da8982402fa722a7
|