It converts MathML to LaTeX
Project description
mathml-to-latex
It converts MathML to LaTeX. Based on the Node.js version of the mathml-to-latex library.
Installation
pip install mathml-to-latex
Usage
from mathml_to_latex.converter import MathMLToLaTeX
mathml = """
<math>
<mrow>
<mi>A</mi>
<mo>=</mo>
<mfenced open = "[" close="]">
<mtable>
<mtr>
<mtd><mi>x</mi></mtd>
<mtd><mi>y</mi></mtd>
</mtr>
<mtr>
<mtd><mi>z</mi></mtd>
<mtd><mi>w</mi></mtd>
</mtr>
</mtable>
</mfenced>
</mrow>
</math>
"""
result = MathMLToLaTeX().convert(mathml)
# A = \begin{bmatrix} x & y \\ z & w \end{bmatrix}
Running Tests
python -m unittest discover tests
Using Docker
docker build -t mathml-to-latex-test .
docker run mathml-to-latex-test
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
mathml_to_latex-1.0.0.tar.gz
(29.4 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
File details
Details for the file mathml_to_latex-1.0.0.tar.gz.
File metadata
- Download URL: mathml_to_latex-1.0.0.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba6a438526684940572d1875b4d5f2d6cb3bea52943830307d08a9fc662e4f69
|
|
| MD5 |
1e3a9e047a6982fc833497c3be2f10aa
|
|
| BLAKE2b-256 |
ba7aca7097fea2caccf90c7c2755c9bc3996271902742e4fe40453b833b192ad
|
File details
Details for the file mathml_to_latex-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mathml_to_latex-1.0.0-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a85ec2434da774be019ed5ea32494616baabf48471b054e3567a7700ae759572
|
|
| MD5 |
508e22d5e605be9225ac3370e44c94bb
|
|
| BLAKE2b-256 |
ae1a20e71ad3f6a7fb4938ed03a7fbba0a42fe1e0115c5add83fcb292403ac86
|