https://github.com/amedama41/mathml2omml
Python library to convert MathML to OMML (Office Math Markup Language)
https://github.com/amedama41/mathml2omml
mathml office omml python python3 xml
Last synced: about 1 year ago
JSON representation
Python library to convert MathML to OMML (Office Math Markup Language)
- Host: GitHub
- URL: https://github.com/amedama41/mathml2omml
- Owner: amedama41
- License: mit
- Created: 2019-11-02T10:35:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-24T07:27:47.000Z (over 6 years ago)
- Last Synced: 2025-02-19T18:04:38.917Z (about 1 year ago)
- Topics: mathml, office, omml, python, python3, xml
- Language: Python
- Homepage: https://pypi.org/project/mathml2omml/
- Size: 30.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
math2omml
=========
Pure Python library to convert MathML to OMML (Office Math Markup Language).
Installation
------------
Use pip:
.. code:: sh
pip install mathml2omml
or, use setup.py:
.. code:: sh
python3 setup.py install
Usage
-----
Mathml2omml takes a MathML as string, and outputs an OMML as string:
.. code:: python
import mathml2omml
mathml = 'x+y'
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:
.. code:: python
import html.entities
mathml = '∫1x'
omml = math2omml.convert(mathml, html.entities.name2codepoint)