Beispiel #1
0
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()
Beispiel #2
0
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()
Beispiel #3
0
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'))
Beispiel #4
0
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"))
Beispiel #5
0
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()
Beispiel #6
0
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()
Beispiel #7
0
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()
Beispiel #8
0
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()