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.3.0.tar.gz (410.7 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.3.0-cp310-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

texform-0.3.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.3.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.3.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.3.0-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

texform-0.3.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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for texform-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a1cbf1536fca6b1a15637fbda1ec19944ab2dccf0d5de573fbb863a34965e6de
MD5 e60a45403f91b3e00f6bc7f13fe900a0
BLAKE2b-256 d47e462bb168f7bac3fa09de5b1a069f9d212f2f95746bf4fb8a522cddcd36ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: texform-0.3.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.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3f7c34849eb591a445a352ecf1934745882b1898dd40ea413ce90e05c4c6e556
MD5 1c506e3b5f14bfbdbfbb77da6b2d60b3
BLAKE2b-256 b11befce0c0efe86837ef4e191b6e254576c54e286d35880a8cd3857d146b5c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c01f87136c64404ec5400f8af715e30724b108d1c70bbbff55a7864073d40414
MD5 0c424bfeb8b273848fc81e85e4d021fe
BLAKE2b-256 8c320cb33155db57dbaa930f657df54d09823f01277277d5c5048acc6ac2e2d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9de00140a138d2d4afa6cef16baa1fefd70827dc25154bc908e29f048059f6ba
MD5 9e8bf4573739ec551aef0fb4ec1eca42
BLAKE2b-256 01ff383437d6d4bb8795e956f20d483549d63338f3ce928a83b4e4c85de65f55

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for texform-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ea5fbcc9c293811115f5d99a71b431ee7081c89eb37c9374f977aaf6b6ba7009
MD5 b7a27e1df80f805a1d48ab00f20023b2
BLAKE2b-256 88e0027bf10a534645a1f7e6a7e6100a287423461f4c5e2d1aa653f90dfe2ed3

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for texform-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4478ebaa07428b2556c8a2c1312d2bad702b85b0e9017d24f03a44b98b508cf7
MD5 1b2ca26842dcb9e42c30944fe085a038
BLAKE2b-256 f3d89433af4c7bb10fda3e2103fab8c1e339c0d062e36ceb990fa5905e6f2644

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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.3.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for texform-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 921ae7c82d28824493032a6ed0c8097152893a558c9ff7ac00ad791cd41d1bde
MD5 a02fb4300ca91c770df0b8523a0fcf8f
BLAKE2b-256 37b1437b44dd6197c2e8d047f985fd4945cee3163304090681a4186c135d30b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for texform-0.3.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

0.4.0

7 files

This release

0.3.0 This release

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