Skip to main content

Pure Python library to convert MathML to OMML (Office Math Markup Language).

Installation

Use pip:

pip install mathml2omml

or, use setup.py:

python3 setup.py install

Usage

Mathml2omml takes a MathML as string, and outputs an OMML as string:

import mathml2omml

mathml = '<math><mi>x</mi><mo>+</mo><mi>y</mi></math>'
omml = math2omml.convert(mathml)

By default, mathml2omml recognises only entities defined in MathML specification. If the input includes other entities, pass the entity information as a dictionary to the second argument:

import html.entities

mathml = '<math><msubsup><mo>&int;</mo><mn>1</mn><mi>x</mi></msubsup></math>'
omml = math2omml.convert(mathml, html.entities.name2codepoint)

Metadata

Release files for mathml2omml 0.0.2

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

Source distribution (sdist)

Source distribution for mathml2omml 0.0.2
File Size Uploaded Provenance
mathml2omml-0.0.2.tar.gz 23.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mathml2omml 0.0.2
File Interpreter ABI Platform
mathml2omml-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 47.1 kB

Release files / mathml2omml-0.0.2.tar.gz

Download URL mathml2omml-0.0.2.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c67b289cd09208c4b6f3c4f74653f6d86edfd8fff4c18e6c95a7afa9994e7323
BLAKE2b-256 checksum
How to use checksums
4a0c8ce3a89839fb263fb9b66e291c9419adcdb57f214c7ca7c9a5d1b28ac4ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3

Release files / mathml2omml-0.0.2-py3-none-any.whl

Download URL mathml2omml-0.0.2-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a2a1a10e90d7d8a672a1b37b6b49a6187e6720439aeb922949d254bb4656f25
BLAKE2b-256 checksum
How to use checksums
b8c90359d7975900d26e30c39d0058828cc1f787ae75171866112aa7e4ce4c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3

Security for mathml2omml 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 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