Skip to main content

MathDOM - Content MathML in Python

Project description

MathDOM - Content MathML in Python

MathDOM is a set of Python 2.4 modules (using PyXML or lxml, and pyparsing) that import mathematical terms as a Content MathML DOM. It currently parses MathML and literal infix terms into a DOM document and writes out MathML and literal infix/prefix/postfix/Python terms. The DOM elements are enhanced by domain specific methods that make using the DOM a little easier. Implementations based on PyXML and lxml/libxml2 are available.

You can call it the shortest way between different term representations and a Content MathML DOM. Ever noticed the annoying differences between terms in different programming languages? Build your application around MathDOM and stop caring about the term representation that users prefer or that your machine can execute. If you need a different representation, add a converter, but don’t change the model of your application. Literal terms are connected through an intermediate AST step that makes writing converters for SQL/Java/Lisp/your-favourite easy.

New in version 0.7:

  • works with lxml 0.9 out-of-the-box

New in version 0.6.7:

  • added missing ‘%’ operator (modulo)

  • adapted to updated lxml API

New in version 0.6.6:

  • closer APIs of mathdom and lmathdom

  • convenience functions to portably create apply, ci and cn elements

New in version 0.6.5:

  • XSLT extension function to include literal terms in output

  • bug fix in Python term serializer

New in version 0.6.4:

  • Updated setup.py script to use setuptools if available

  • Support for splitting package into two PyXML and lxml dependent packages

  • Now builds patched lxml during install

New in version 0.6.3.1:

  • Fixes a number of bugs in mathdom and lmathdom modules

New in version 0.6.2:

  • Generalized parser framework

  • Python term parser

New in version 0.6.1:

  • integration of the PyMathML renderer (untested!)

  • more generic integration of XSLT scripts

New in version 0.6:

  • RelaxNG validation (lxml)

  • Presentation MathML export (based on XSLT/lxml)

  • stricter spec conformance (encloses MathML output in <math> tag

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathdom-0.7.tar.gz (106.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mathdom-0.7-py2.4.egg (175.5 kB view details)

Uploaded Egg

File details

Details for the file mathdom-0.7.tar.gz.

File metadata

  • Download URL: mathdom-0.7.tar.gz
  • Upload date:
  • Size: 106.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mathdom-0.7.tar.gz
Algorithm Hash digest
SHA256 feb0e2bd69a68735c1d27dbc42faf461e623e59d2c419627d78493f4f837cd80
MD5 71b4264f5d5ae1095e2493552d13847a
BLAKE2b-256 b3cc8ab71f79227dffef92b288fcfcc1f83eb443db1f9e1862badb8c7a010ee4

See more details on using hashes here.

File details

Details for the file mathdom-0.7-py2.4.egg.

File metadata

  • Download URL: mathdom-0.7-py2.4.egg
  • Upload date:
  • Size: 175.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mathdom-0.7-py2.4.egg
Algorithm Hash digest
SHA256 ede6c9c12466227f0cdc75387c055007104d7f346a940b46dd1bbc972a1075de
MD5 df568d9c1db198473ffb907d5ec30e7c
BLAKE2b-256 cb51eb79942ae821554bcd8a6257b08e2cce72ad9f90259f9111bf1707886467

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page