close = openers[open].close or ""
return "".join(map(unparse_latex, l)) + close
trivial_math_re = re.compile(r"@?[\d.,]*(\\%|%)?")
def xmlify_string(s):
Convert output of parse_latex into an XML string.
It does *not* escape <, >, and &.
After Change
return s
math_table = {r"\sim": r"\textasciitilde"}
for c in list(".,@%~") + [r"\%"]:
math_table[c] = c
def flatten_trivial_math(node):
Convert math that doesn"t really need to be math into text.
def visit(node):
if isinstance(node, str):