Example #1
0
def xsection(nd):
    s = nd.ref.textContent + '. ' + nd.attributes['title'].textContent
    r = txt.tr(s)
    p = spar('section')
    p.append(r)
    Body.append(p)
    setx(nd, p, Body)
    ct.cnl(nd)
Example #2
0
def xsection(nd):
    s = nd.ref.textContent + '. ' + nd.attributes['title'].textContent
    r = txt.tr(s)
    p = spar('section')
    p.append(r)
    Body.append(p)
    setx(nd, p, Body)
    ct.cnl(nd)
Example #3
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()
Example #4
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()
Example #5
0
def xmaketitle(nd):
    i = 0
    if 'title' in _mt.keys():
        Body.insert(i,_mt['title'])
        i = i+1
    if 'author' in _mt.keys():
        Body.insert(i,_mt['author'])
        i = i+1
    if 'date' in _mt.keys():
        Body.insert(i,_mt['date'])
    else:
        npf.push()
        p = spar('author')
        p.append(txt.tr(datetime.date.strftime(datetime.date.today(),'%B %d, %Y')))
        Body.insert(2, p)
        npf.pop()
Example #6
0
def xmaketitle(nd):
    i = 0
    if 'title' in _mt.keys():
        Body.insert(i, _mt['title'])
        i = i + 1
    if 'author' in _mt.keys():
        Body.insert(i, _mt['author'])
        i = i + 1
    if 'date' in _mt.keys():
        Body.insert(i, _mt['date'])
    else:
        npf.push()
        p = spar('author')
        p.append(
            txt.tr(datetime.date.strftime(datetime.date.today(), '%B %d, %Y')))
        Body.insert(2, p)
        npf.pop()