def xeqnarray(nd): p = etree.Element(NSM + "oMathPara") m = etree.SubElement(p, NSM + "oMath") m = etree.SubElement(m, NSM + "m") m.append(_mpreqa()) getap(nd).append(p) setx(nd, p, m) mmf.push() mmf.set() ct.cnl(nd) mmf.pop()
def xeqnarray(nd): p = etree.Element(NSM + 'oMathPara') m = etree.SubElement(p, NSM + 'oMath') m = etree.SubElement(m, NSM + 'm') m.append(_mpreqa()) getap(nd).append(p) setx(nd, p, m) mmf.push() mmf.set() ct.cnl(nd) mmf.pop()
def xdisplaymath(nd): ap = getap(nd) if nd.previousSibling != None: ap.append(etree.Element(NSW + 'br')) mmf.push() mmf.set() p = etree.Element(NSM + 'oMathPara') m = etree.SubElement(p, NSM + 'oMath') setx(nd, p, m) ct.cnl(nd) ap.append(p) mmf.pop() if nd.previousSibling != None: ap.append(etree.Element(NSW + 'br'))
def xdisplaymath(nd): ap = getap(nd) if nd.previousSibling != None: ap.append(etree.Element(NSW + "br")) mmf.push() mmf.set() p = etree.Element(NSM + "oMathPara") m = etree.SubElement(p, NSM + "oMath") setx(nd, p, m) ct.cnl(nd) ap.append(p) mmf.pop() if nd.previousSibling != None: ap.append(etree.Element(NSW + "br"))
def xmath(nd): mmf.push() mmf.set() if ntf.isset(): ntf.push() ntf.clear() setap(nd, getap(nd)) ct.cnl(nd) ntf.pop() else: e = etree.Element(NSM + 'oMath') setx(nd, e, e) ct.cnl(nd) getap(nd).append(e) mmf.pop()
def xmath(nd): mmf.push() mmf.set() if ntf.isset(): ntf.push() ntf.clear() setap(nd, getap(nd)) ct.cnl(nd) ntf.pop() else: e = etree.Element(NSM + "oMath") setx(nd, e, e) ct.cnl(nd) getap(nd).append(e) mmf.pop()
def xequation(nd): t = deepcopy(_tbe) it = t.iter(NSW + 'p') lp = it.next() mp = it.next() rp = it.next() p = etree.SubElement(mp, NSM + 'oMathPara') m = etree.SubElement(p, NSM + 'oMath') ref = '(' + nd.ref.textContent + ')' rp.append(txt.tr(ref)) Body.append(t) setx(nd, p, m) mmf.push() mmf.set() ct.cnl(nd) mmf.pop()
def xequation(nd): t = deepcopy(_tbe) it = t.iter(NSW + "p") lp = it.next() mp = it.next() rp = it.next() p = etree.SubElement(mp, NSM + "oMathPara") m = etree.SubElement(p, NSM + "oMath") ref = "(" + nd.ref.textContent + ")" rp.append(txt.tr(ref)) Body.append(t) setx(nd, p, m) mmf.push() mmf.set() ct.cnl(nd) mmf.pop()