Skip to main content

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

Metadata

Release files for mathml-to-latex 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mathml-to-latex 1.0.0
File Size Uploaded Provenance Actions
mathml_to_latex-1.0.0.tar.gz 29.4 kB Without provenance Details for mathml_to_latex-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mathml-to-latex 1.0.0
File Interpreter ABI Platform Actions
mathml_to_latex-1.0.0-py3-none-any.whl Python 3 none any Details for mathml_to_latex-1.0.0-py3-none-any.whl

Total release size: 61.6 kB

Release files / mathml_to_latex-1.0.0.tar.gz

Download URL mathml_to_latex-1.0.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba6a438526684940572d1875b4d5f2d6cb3bea52943830307d08a9fc662e4f69
BLAKE2b-256 checksum
How to use checksums
ba7aca7097fea2caccf90c7c2755c9bc3996271902742e4fe40453b833b192ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release files / mathml_to_latex-1.0.0-py3-none-any.whl

Download URL mathml_to_latex-1.0.0-py3-none-any.whl
Size 32.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a85ec2434da774be019ed5ea32494616baabf48471b054e3567a7700ae759572
BLAKE2b-256 checksum
How to use checksums
ae1a20e71ad3f6a7fb4938ed03a7fbba0a42fe1e0115c5add83fcb292403ac86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Security for mathml-to-latex 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page