示例#1
0
文件: mm.py 项目: nvminhtu/LaTex2Docx
def xfunc(nd):
    s = nd.nextSibling.textContent
    n = nd.tagName
    if s:
        if s[0] not in {'(', '[', '{'}:
            getap(nd).append(txt.pmtr(n + u'\u2006'))
        else:
            getap(nd).append(txt.pmtr(n))
    else:
        getap(nd).append(txt.pmtr(n))
示例#2
0
文件: mm.py 项目: hao-han/LaTex2Docx
def xfunc(nd):
    s = nd.nextSibling.textContent
    n = nd.tagName
    if s:
        if s[0] not in {"(", "[", "{"}:
            getap(nd).append(txt.pmtr(n + u"\u2006"))
        else:
            getap(nd).append(txt.pmtr(n))
    else:
        getap(nd).append(txt.pmtr(n))
示例#3
0
文件: mm.py 项目: nvminhtu/LaTex2Docx
def limlow(nd, s):
    ll = etree.Element(NSM + 'limLow')
    e = etree.SubElement(ll, NSM + 'e')
    e.append(txt.pmtr(s))
    l = etree.SubElement(ll, NSM + 'lim')
    getap(nd).append(ll)
    ns = nd.nextSibling
    if ns.nodeName == 'active::_':
        setap(ns, l)
        ct.cnl(ns)
        nd.parentNode.removeChild(ns)
示例#4
0
文件: mm.py 项目: hao-han/LaTex2Docx
def limlow(nd, s):
    ll = etree.Element(NSM + "limLow")
    e = etree.SubElement(ll, NSM + "e")
    e.append(txt.pmtr(s))
    l = etree.SubElement(ll, NSM + "lim")
    getap(nd).append(ll)
    ns = nd.nextSibling
    if ns.nodeName == "active::_":
        setap(ns, l)
        ct.cnl(ns)
        nd.parentNode.removeChild(ns)