Skip to main content

Converts MathML to LaTeX

Project description

mml2tex (Python)

Python library to convert MathML to LaTeX using the transpect XSLT stylesheets.

Installation

pip install mml2tex

Usage

from mml2tex import mml_to_latex

mathml_input = """<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
    <mml:mi>A</mml:mi>
    <mml:mo>=</mml:mo>
    <mml:mi>π</mml:mi>
    <mml:msup>
    <mml:mrow><mml:mi>r</mml:mi></mml:mrow>
    <mml:mrow><mml:mn>2</mml:mn></mml:mrow>
    </mml:msup>
</mml:math>"""

latex = mml_to_latex(mathml_input)
print(latex) # A=\pi r^{2}

Project details


Download files

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

Source Distribution

mml2tex-0.1.0.tar.gz (92.7 kB view details)

Uploaded Source

Built Distribution

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

mml2tex-0.1.0-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

File details

Details for the file mml2tex-0.1.0.tar.gz.

File metadata

  • Download URL: mml2tex-0.1.0.tar.gz
  • Upload date:
  • Size: 92.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for mml2tex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53964c7dd3c9957f67344a95d6dc42f5032edf60e5efea3c9c37301599b2e6fb
MD5 ac2008e18c0f690921453ab031b16401
BLAKE2b-256 323f1454a23a40782f289dffb06bd71b0de7537af41a46e783e755ae4aca6f56

See more details on using hashes here.

File details

Details for the file mml2tex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mml2tex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for mml2tex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 804bd15c371ed6105eeaef4bff00b78771ae2c40aced8200437ea800576aad50
MD5 0ba24b9908dc4aa1a7a5c135ed63d0ca
BLAKE2b-256 bd23e74c94d3be4bc860a883beaed1642677ea01bed1db66700c29977228cef3

See more details on using hashes here.

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