Pure Python library to convert MathML to OMML (Office Math Markup Language).
Installation
Use pip:
pip install mathml2omml_as
or, use setup.py:
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>∫</mo><mn>1</mn><mi>x</mi></msubsup></math>'
omml = math2omml.convert(mathml, html.entities.name2codepoint)
Metadata
Release files for mathml2omml-as 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mathml2omml_as-0.1.0.tar.gz | 25.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mathml2omml_as-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.8 kB
Release files / mathml2omml_as-0.1.0.tar.gz
| Download URL | mathml2omml_as-0.1.0.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6defed2573a9eb9f76a0ffe56e946bd86b904f01743cdc2879a5edd1457cd7a
|
|
BLAKE2b-256 checksum How to use checksums |
294ccf348f43eca6170c1d6e80171c01879fe6f935c00cead4a0a0c8061fc8b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / mathml2omml_as-0.1.0-py3-none-any.whl
| Download URL | mathml2omml_as-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20ee45f45ced7cb2414b6b627c6bae25c43f2b4d44c9d89902c582b3755dc95b
|
|
BLAKE2b-256 checksum How to use checksums |
006924017fe54856f99b466f973389a2e66299beb4036916e339a1ba2ea2dda3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|