class documentation

class math(object):

Known subclasses: docutils.utils.math.latex2mathml.MathRowSchema, docutils.utils.math.latex2mathml.MathSchema, docutils.utils.math.latex2mathml.MathToken, docutils.utils.math.latex2mathml.mfrac, docutils.utils.math.latex2mathml.mrow, docutils.utils.math.latex2mathml.mspace, docutils.utils.math.latex2mathml.mtable

View In Hierarchy

Base class for MathML elements and root of MathML trees.
Method __getitem__ Undocumented
Method __init__ Set up node with children and attributes.
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method append Append child and return self or first non-full parent.
Method close Close element and return first non-full parent or None.
Method extend Undocumented
Method full Return boolean indicating whether children may be appended.
Method get Undocumented
Method toprettyxml Return XML representation of self as string.
Method xml​_starttag Undocumented
Class Variable html​_tagname Tag name for HTML representation.
Class Variable nchildren Expected number of children or None
Class Variable parent Parent node in MathML DOM tree.
Class Variable xml​_entities Undocumented
Instance Variable attributes Undocumented
Instance Variable children Undocumented
Method ​_xml Undocumented
Method ​_xml​_body Undocumented
Class Variable ​_boolstrings String representation of boolean MathML attribute values.
Class Variable ​_level Undocumented
def __getitem__(self, key):

Undocumented

def __init__(self, *children, **attributes):

Set up node with children and attributes.

Attributes are downcased: Use CLASS to set "class" value. >>> math(mn(3), CLASS='test') math(mn(3), class='test') >>> math(CLASS='test').toprettyxml() '<math class="test">

</math>'

def __len__(self):

Undocumented

def __repr__(self):

Undocumented

def __setitem__(self, key, item):

Undocumented

def append(self, child):

Append child and return self or first non-full parent.

If self is full, go up the tree and return first non-full node or None.

def close(self):
Close element and return first non-full parent or None.
def extend(self, children):

Undocumented

def full(self):
Return boolean indicating whether children may be appended.
def get(self, *args, **kwargs):

Undocumented

def toprettyxml(self):
Return XML representation of self as string.
def xml_starttag(self):

Undocumented

html_tagname: str =
Tag name for HTML representation.
parent =
Parent node in MathML DOM tree.
xml_entities =

Undocumented

attributes =

Undocumented

children: list =

Undocumented

def _xml(self, level=0):

Undocumented

def _xml_body(self, level=0):

Undocumented

_boolstrings: dict[bool, str] =
String representation of boolean MathML attribute values.
_level: int =

Undocumented