def math2html(formula):
 factory = FormulaFactory()
 whole = factory.parseformula(formula)
 FormulaProcessor().process(whole)
 whole.process()
 return ''.join(whole.gethtml())

def math2html ( formula ) : factory = FormulaFactory ( ) whole = factory . parseformula ( formula ) FormulaProcessor ( ) . process ( whole ) whole . process ( ) return '' . join ( whole . gethtml ( ) )
convert some tex math to html .