Python bindings for the TeXForm LaTeX parser
Project description
texform
Python bindings for TeXForm, a LaTeX formula parser, editor, and normalizer built on a structured command knowledge base.
pip install texform
Quick start
import texform
# Normalize a formula into a canonical form chosen by profile.
engine = texform.TransformEngine(profile="corpus")
result = engine.normalize(r"a \over b")
assert result["normalized"] == r"\frac { a } { b }"
# Parse through the engine, transform the live document in place, then serialize.
parsed = engine.parse(r"a \over b")
if parsed["document"] is not None:
document = parsed["document"]
engine.transform(document)
assert document.to_latex() == r"\frac { a } { b }"
Profiles select the normalization target: "authoring", "faithful", "corpus", and "equiv".
Python-specific notes
Parser.parsereturns a dict with adocumentvalue (orNone) plus adiagnosticslist — the same three-state contract as the Rust API.- All names follow Python conventions: methods and dict keys are snake_case (
to_latex,validate_argspecreturnsarg_count). - Parse and edit errors raise structured exceptions (
texform.ParseErrorand friends); no Rust panic ever crosses the boundary. - The package ships
py.typedand.pyistubs, so type checkers and IDE completion work out of the box. - Wheels are abi3 and require Python 3.10 or newer.
Learn more
The Python API mirrors the Rust facade one-to-one. For the full picture — the editable document tree, transform profiles, and the architecture — see the GitHub repository.
License
Apache-2.0.
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
Built Distributions
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 texform-0.2.0.tar.gz.
File metadata
- Download URL: texform-0.2.0.tar.gz
- Upload date:
- Size: 374.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0127970f5598d09a5b6fb6bd1d917d0d313c361d8d4036fedd815ebe3902a0e
|
|
| MD5 |
9db5da2693bfb53d3261f4f623afbae8
|
|
| BLAKE2b-256 |
6522e0d81c917d53b19c4db308376636014071ccbec78cb867ab2d20aa64bfba
|
Provenance
The following attestation bundles were made for texform-0.2.0.tar.gz:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0.tar.gz -
Subject digest:
f0127970f5598d09a5b6fb6bd1d917d0d313c361d8d4036fedd815ebe3902a0e - Sigstore transparency entry: 2052466967
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12580fb6e75fe11287c760d6fe24a39b468eae4e86491de9a7fd0c4b9c497e72
|
|
| MD5 |
a364d6542eb48bc10125275553d4d681
|
|
| BLAKE2b-256 |
a1aebfd0da1d1d999f4c95d0c254f98f50a06892f0b2413b82dd81a66a2b57c8
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-win_amd64.whl -
Subject digest:
12580fb6e75fe11287c760d6fe24a39b468eae4e86491de9a7fd0c4b9c497e72 - Sigstore transparency entry: 2052469046
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3bc727e8560d5923b5121bb956ecb4edbac951ee0b3d49f8d7671a24b86d066
|
|
| MD5 |
31a7a82b0171f255399d882d6147a989
|
|
| BLAKE2b-256 |
e70220feb6be015d4fe8cbb97980711525cbb1386cf3c8182ad8015e102adc9d
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
d3bc727e8560d5923b5121bb956ecb4edbac951ee0b3d49f8d7671a24b86d066 - Sigstore transparency entry: 2052468612
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73af30a3cc0e72e65954944778c5506f6e5bfb5d99ae182d3d1b68c2c5fe568c
|
|
| MD5 |
d13fefd4038891a05cb816249004a7dd
|
|
| BLAKE2b-256 |
8101beea38235231b665db5e1ab234f3ef6d8dff391b47378dd29fd9626a44f3
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
73af30a3cc0e72e65954944778c5506f6e5bfb5d99ae182d3d1b68c2c5fe568c - Sigstore transparency entry: 2052469458
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c0389678e0ecdea36548d8aa4db134e344dde98d8c805bc00772e743bc126d9
|
|
| MD5 |
565aed3ded167eb26fadb6bf41d9f900
|
|
| BLAKE2b-256 |
7feb567b5b2f19847da378fe86ac6e70f3af0d6d61e056a0de19a649ead6777d
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
6c0389678e0ecdea36548d8aa4db134e344dde98d8c805bc00772e743bc126d9 - Sigstore transparency entry: 2052467962
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34e231a47e2faf0191165bd0812fb4dc591077f6e7b077c210c9e99bdf86a209
|
|
| MD5 |
ca9ae869082211304ef4d5826ca451ed
|
|
| BLAKE2b-256 |
12a78ca654a05923f37d96489c0b8e304e90e90f9329d00581946fdcb6c0701c
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
34e231a47e2faf0191165bd0812fb4dc591077f6e7b077c210c9e99bdf86a209 - Sigstore transparency entry: 2052467471
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file texform-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: texform-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd1c09ec0cb56a8198267e8913b59934847ce25e1d679f05801088985c574e2
|
|
| MD5 |
c47b96a6128e8ee78644512dca31a7f9
|
|
| BLAKE2b-256 |
172d4f99abb6caf8b1d101449db7e994bedb7824740f4eeb0f0780830da2b502
|
Provenance
The following attestation bundles were made for texform-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on texform-dev/texform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texform-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
9dd1c09ec0cb56a8198267e8913b59934847ce25e1d679f05801088985c574e2 - Sigstore transparency entry: 2052469998
- Sigstore integration time:
-
Permalink:
texform-dev/texform@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/texform-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b47a54836a7f3285461fb2219558ef3cc91b78 -
Trigger Event:
push
-
Statement type: