Skip to content

davidchern/mathml2tex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

mathml2tex

Convert MathML back into Math-Tex, but with only a subset of MathML syntaxes is supported (yet extending it is quite simple).

Run on Python 2.7, may run on Python 3.x too.

Requirement

BeautifulSoup 4. To install it, just run

pip install bs4

Usage

from mathml2tex import MathMLTeX

m = MathMLTeX()

xml = '''<math xmlns="http://www.w3.org/1998/Math/MathML">
      <msqrt>
        <mn>2</mn>
      </msqrt>
    </math>'''

m.convert(xml) # -> '\\sqrt{2}'

About

Convert mathml back into math-tex

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages