Skip to main content

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.parse returns a dict with a document value (or None) plus a diagnostics list — the same three-state contract as the Rust API.
  • All names follow Python conventions: methods and dict keys are snake_case (to_latex, validate_argspec returns arg_count).
  • Parse and edit errors raise structured exceptions (texform.ParseError and friends); no Rust panic ever crosses the boundary.
  • The package ships py.typed and .pyi stubs, 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 repository README.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

texform-0.4.0.tar.gz (411.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

texform-0.4.0-cp310-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

texform-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

texform-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

texform-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

texform-0.4.0-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

texform-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file texform-0.4.0.tar.gz.

File metadata

  • Download URL: texform-0.4.0.tar.gz
  • Upload date:
  • Size: 411.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for texform-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c590db6497ad485e0b08c25b60732af027a02ee3614cd3f015c0eb82c48d4b60
MD5 a993ce695229c5b085e7a642034a2abd
BLAKE2b-256 010ffaad44a1915553037f4bb22c94c77b6a2ac76826960e3ec8ccf43c9aa89f

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0.tar.gz:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: texform-0.4.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 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

Hashes for texform-0.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 72f9045d63ccb64475c380fb3a344cfdd756b48e9f915889616642adcaf21616
MD5 9fd63da17d4be602383815aff5a147a7
BLAKE2b-256 63ad62692905533c937979787f9d7b383a7437de57326e6a43334dc97e098270

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 581b21ea537c67ef80b2685b2a9646f7af217674e7829bb0e39f3be5274d4bd6
MD5 80807bb94a86dc4b04a7bb11b43d995a
BLAKE2b-256 d6e5743fad1a06b781c3281a411241667932ee5f3e7640b9ea34d33feb418a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 82be393fee9f811b5f9566de370e2b052452ea00ec9699af86e45bb8bcf6a449
MD5 0d8affa15328a50c09956c7202834a79
BLAKE2b-256 da6ad1d20c08a5fbe23b370ceedf3d154cdd0443815c595831b8a3c42305acbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for texform-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e50244ef2e2d0e0e03c2492a0452f4e3d923d76dcb8d3d46f15f0984614c9b6e
MD5 53f5d38a39e3902a0f73902ca896d7f2
BLAKE2b-256 bbfbe4de2b15872ec5b7989602c8ddd6a3f8d9c3bacf5cfe99a1ee07d31072c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for texform-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d57db8ab7f2eaf09dbf84ca07b09c7a14fc836c99d97fa090255eba906efef0a
MD5 b05391c129031429df5edc0e717446cd
BLAKE2b-256 578474dba87a25c97c8cb89a713a267beecc69edd87704b7a8c24857ab41b304

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texform-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 09feeb87ecec38965db3f3651c6dce13304c1996c0acf58a080ab9cd899edf12
MD5 4e9ac22435cbceba7309d0e581b3be38
BLAKE2b-256 2975ec4ce90e36d7cd1d6f503695decd1beb26ab681db0d0762219c01191bc20

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on texform-dev/texform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

7 files

0.3.0

7 files

0.2.1

7 files

0.2.0

7 files

0.1.0

6 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