Metadata-Version: 2.4
Name: mml2tex
Version: 0.1.0
Summary: Converts MathML to LaTeX
Author: Haohan Yang
Author-email: yanghaohanmail@gmail.com
Requires-Python: >=3.9
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: lxml (>=6.0.0)
Requires-Dist: saxonche (==12.9.0)
Description-Content-Type: text/markdown

# mml2tex (Python)

Python library to convert MathML to LaTeX using the [transpect XSLT stylesheets](https://github.com/transpect/mml2tex).

## Installation

```bash
pip install mml2tex
```

## Usage

```python
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}
```

