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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mml2tex-0.1.0-py3-none-any.whl
(99.1 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53964c7dd3c9957f67344a95d6dc42f5032edf60e5efea3c9c37301599b2e6fb
|
|
| MD5 |
ac2008e18c0f690921453ab031b16401
|
|
| BLAKE2b-256 |
323f1454a23a40782f289dffb06bd71b0de7537af41a46e783e755ae4aca6f56
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804bd15c371ed6105eeaef4bff00b78771ae2c40aced8200437ea800576aad50
|
|
| MD5 |
0ba24b9908dc4aa1a7a5c135ed63d0ca
|
|
| BLAKE2b-256 |
bd23e74c94d3be4bc860a883beaed1642677ea01bed1db66700c29977228cef3
|