Пример #1
0
def xtheorem(nd):
    cap = nd.caption
    p = etree.Element(NSW+'p')
    setap(cap, p)
    rbf.push()
    rbf.set()
    ct.cnl(cap)
    p.append(txt.tr(' '+nd.ref.textContent))
    rbf.pop()

    rif.push()
    rif.set()
    i = 1
    if nd.childNodes[0].firstChild.nodeName == 'displaymath':
        i = 0
    else:
        setap(nd.childNodes[0], p)
        ct.cnl(nd.childNodes[0])
    np = getap(nd.parentNode)
    setap(nd, np)
    np.append(p)
    for par in nd.childNodes[i:]:
        ct.cnd(par)
    rif.pop()
    npf.clear()
Пример #2
0
def xtheorem(nd):
    cap = nd.caption
    p = etree.Element(NSW + 'p')
    setap(cap, p)
    rbf.push()
    rbf.set()
    ct.cnl(cap)
    p.append(txt.tr(' ' + nd.ref.textContent))
    rbf.pop()

    rif.push()
    rif.set()
    i = 1
    if nd.childNodes[0].firstChild.nodeName == 'displaymath':
        i = 0
    else:
        setap(nd.childNodes[0], p)
        ct.cnl(nd.childNodes[0])
    np = getap(nd.parentNode)
    setap(nd, np)
    np.append(p)
    for par in nd.childNodes[i:]:
        ct.cnd(par)
    rif.pop()
    npf.clear()
Пример #3
0
def xbf(nd):
    rbf.set()
    setap(nd, getap(nd))
    ct.cnl(nd)
    rbf.clear()