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 GitHub repository.

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.2.1.tar.gz (384.3 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.2.1-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

texform-0.2.1-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.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

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

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

texform-0.2.1-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.2.1.tar.gz.

File metadata

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

File hashes

Hashes for texform-0.2.1.tar.gz
Algorithm Hash digest
SHA256 87d695c86b2a9b47cec89ba83aa1b5c123ee8eb239aff9abe4de513bd76ca437
MD5 e80663a288f8ed9c8c96a912ac87af4e
BLAKE2b-256 337d1a5446100e35d3b93012e6b530dca0ac8a4db943968d56e7d8f1996369fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: texform-0.2.1-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

Hashes for texform-0.2.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 11749ca6a3945a2be9dedfe0fd93f945e57003aa5bc611a0f9020a9380fe69f2
MD5 48b9b531c8431c7e93fb70250123ea07
BLAKE2b-256 ff08fc0f1b98ad9ff012c0a8a0a4c4f445a6f42dc9ae577b66c60bcfc44ce692

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4f40d7e3405660c3f248a659e9326491f1dc1539105de101e919d280b3dbd05b
MD5 6bf2597a2e0615ddeae53da32aacfacf
BLAKE2b-256 dab22732365e4936d83db2bc4704c65b5bfbeeb8a00225d5ed9fdf8d42d7b803

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cbabd088bc9b346f4f838947bd1733f64a95135c63fe2ce6ada1d850408b52b9
MD5 56935c679af50ebde2a9148dc8a69a0c
BLAKE2b-256 b1890f5992e32d0331320202d83a01953c72f23ccf927d73b74c6ab46a30a90c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4f81c95ee7a4bce569bff108ca8aaef90b3edef8046cf80f6c42ce75e8320beb
MD5 a39137b4b89422a29390be867b198b4d
BLAKE2b-256 b1e5f959e820b595eba1671fc8367f07cd1b0c221ceb4ba5b013e88c35275471

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4c91db6ae2996b0a8ba78308489df0c1db1334318532b42def54a7e9c72fc490
MD5 5ce246606df44365d00726c37c59f7c7
BLAKE2b-256 14cf5b3256ba378d652e62c5120eb2582e7f3fba171e86aa46aee623d735451b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.2.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 667947a9a6b35cfeae8e2601caf21f385744f9932c1017d62c226aca7d39ef00
MD5 f50f41188516d5bfd5e7cfd371732bff
BLAKE2b-256 a595259acf5b713be95bf2a456161e3385f6103861f2ad2c26781313e16413e5

See more details on using hashes here.

Provenance

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

0.3.0

7 files

This release

0.2.1 This release

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