(self, e)
return n.lower()
Returns the MathML tag for an expression.
Returns the MathML tag for an expression.
Returns the MathML tag for an expression .
def mathml_tag(self, e):
        """Returns the MathML tag for an expression."""
        translate = {
            'Add': 'plus',
            'Mul': 'times',
            'Derivative': 'diff',
            'Number': 'cn',
            'int': 'cn',
            'Pow': 'power',
            'Symbol': 'ci',
            'Integral': 'int',
            'Sum': 'sum',
            'sin': 'sin',
            'cos': 'cos',
            'tan': 'tan',
            'cot': 'cot',
            'asin': 'arcsin',
            'asinh': 'arcsinh',
            'acos': 'arccos',
            'acosh': 'arccosh',
            'atan': 'arctan',
            'atanh': 'arctanh',
            'acot': 'arccot',
            'atan2': 'arctan',
            'log': 'ln',
            'Equality': 'eq',
            'Unequality': 'neq',
            'GreaterThan': 'geq',
            'LessThan': 'leq',
            'StrictGreaterThan': 'gt',
            'StrictLessThan': 'lt',
        }

        for cls in e.__class__.__mro__:
            n = cls.__name__
            if n in translate:
                return translate[n]
        # Not found in the MRO set
        n = e.__class__.__name__
        return n.lower()
def mathml_tag ( self , e ) : translate = { 'Add' : 'plus' , 'Mul' : 'times' , 'Derivative' : 'diff' , 'Number' : 'cn' , 'int' : 'cn' , 'Pow' : 'power' , 'Symbol' : 'ci' , 'Integral' : 'int' , 'Sum' : 'sum' , 'sin' : 'sin' , 'cos' : 'cos' , 'tan' : 'tan' , 'cot' : 'cot' , 'asin' : 'arcsin' , 'asinh' : 'arcsinh' , 'acos' : 'arccos' , 'acosh' : 'arccosh' , 'atan' : 'arctan' , 'atanh' : 'arctanh' , 'acot' : 'arccot' , 'atan2' : 'arctan' , 'log' : 'ln' , 'Equality' : 'eq' , 'Unequality' : 'neq' , 'GreaterThan' : 'geq' , 'LessThan' : 'leq' , 'StrictGreaterThan' : 'gt' , 'StrictLessThan' : 'lt' , } for cls in e . __class__ . __mro__ : n = cls . __name__ if n in translate : return translate [ n ] # Not found in the MRO set n = e . __class__ . __name__ return n . lower ( )