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:
mathml = '<math><msubsup><mo>∫</mo><mn>1</mn><mi>x</mi></msubsup></math>'
omml = math2omml.convert(mathml, {'int': '∫'})
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.1.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for mathml2omml-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91f10c391f60345c38ca9d62a8827f1369c4d69bf1cf7915379cf7f84630faa1 |
|
MD5 | 8322cb08906776090c8b2670ec00a550 |
|
BLAKE2b-256 | f6ece352d179609be098e05289c6d15e2558ea6b4d5b0e484df55183257b6e86 |