No project description provided
Project description
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>∫</mo><mn>1</mn><mi>x</mi></msubsup></math>'
omml = math2omml.convert(mathml, html.entities.name2codepoint)
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
mathml2omml-0.0.2.tar.gz
(23.3 kB
view details)
Built Distribution
File details
Details for the file mathml2omml-0.0.2.tar.gz
.
File metadata
- Download URL: mathml2omml-0.0.2.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67b289cd09208c4b6f3c4f74653f6d86edfd8fff4c18e6c95a7afa9994e7323 |
|
MD5 | baa3be69d97d53b350dc06ae880515fd |
|
BLAKE2b-256 | 4a0c8ce3a89839fb263fb9b66e291c9419adcdb57f214c7ca7c9a5d1b28ac4ba |
File details
Details for the file mathml2omml-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: mathml2omml-0.0.2-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2a1a10e90d7d8a672a1b37b6b49a6187e6720439aeb922949d254bb4656f25 |
|
MD5 | 72492f45f2030b07b28ff2e33cc6fb29 |
|
BLAKE2b-256 | b8c90359d7975900d26e30c39d0058828cc1f787ae75171866112aa7e4ce4c76 |