예제 #1
0
def ext_math_role(role, raw, text, line, inliner, options={}, content=[]):
    text = replace_mathdefs(inliner.document, raw.split('`')[1])
    return math_role(role,
                     raw,
                     text,
                     line,
                     inliner,
                     options=options,
                     content=content)
예제 #2
0
파일: mathmacro.py 프로젝트: smithsp/doc
def new_math_role(role, rawtext, text, lineno, inliner, 
                  options={}, content=[]):
    """New math role parsing the latex code."""
    try:
        math_macros = inliner.document.math_macros
    except AttributeError:
        pass
    else:
        if math_macros:
            rawtext = multiple_replace(rawtext, math_macros)
            text = rawtext.split('`')[1]

    return math_role(role, rawtext, text, lineno, inliner,
                     options=options, content=content)
예제 #3
0
def ext_math_role(role, raw, text, line, inliner, options = {}, content = []):
  text = replace_mathdefs(inliner.document, raw.split('`')[1])
  return math_role(role, raw, text, line, inliner, options = options,
                   content = content)