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 hashes)
Built Distribution
Close
Hashes for mathml2omml-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2a1a10e90d7d8a672a1b37b6b49a6187e6720439aeb922949d254bb4656f25 |
|
MD5 | 72492f45f2030b07b28ff2e33cc6fb29 |
|
BLAKE2b-256 | b8c90359d7975900d26e30c39d0058828cc1f787ae75171866112aa7e4ce4c76 |