Skip to main content

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, inspect, edit, and serialize back to LaTeX.
parsed = texform.Parser().parse(r"\frac{x}{y}")
if parsed["document"] is not None:
    print(parsed["document"].to_latex())

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.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

texform-0.1.0-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

texform-0.1.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.1.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: texform-0.1.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.12

File hashes

Hashes for texform-0.1.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5d0f078d0bbd49d2ab9d580d9d01e3b3929fb481e1bae786935effe408c52113
MD5 901213b681b29d5e5a307ac3c2d463a0
BLAKE2b-256 b93da1853444b32dfefcf7bf9c5f98a1ae0d0853605ee49403ebe7d4357d6abf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f6f492cec61d7b5ba3d8b0135c4409d7c853924e3cd5f6ac4fe2206b60139883
MD5 755129c0ded902aa0b11b4f4f354b658
BLAKE2b-256 9b970d022f901abd29f79b86198b8446e35095ab530e503d43b33f1dc560ca9a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f2d633b88c39ed2558ae5300c2a0269b261dde3c701f16aa74177d6dd0a8c90
MD5 7b27743ab634014a7234a5090c8ddef5
BLAKE2b-256 e7dcd5b352bd06f282308e76d778982080d4645b7e1bfe798f2a20f5cad06eff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8d6adcb9b535fa9f3c99bdcc30a07fb7f935037b91028ece8dd1f348347c54ea
MD5 d5540f1edb7e2e2fb4f13471f328e9b9
BLAKE2b-256 d7b35dbfae7f8d81e087319facc439e88abc162193867a3b2c210d38ee946052

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80b91f15ff435332e864365f2d66bff82f17ad78fc3b7e7b5e19be44cce2848e
MD5 fc30413e1ca9cb675a9610d60fa3ff16
BLAKE2b-256 3c61c7c1a7eaa700b04fcc801d7616fe990799cbcdb48fe1a66a3a37fecaf1f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for texform-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4bd70df787f4a08cf994550022501134296833f2d60f855c6adfdbeab6aa12a0
MD5 791e926389b3bc8ec0181e4b50875459
BLAKE2b-256 dea9cc942021ca10a8de3727078d958629c7915871a83ba649700bbe63c53142

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page