Exemplo n.º 1
0
def latex_solutions(solutions, var="x"):
    """Takes solutions in the form [x == a, x == b] and returns their LaTex representation"""
    return weblatex.escape_latex_for_web(
            '\ or\ '.join([sympy.latex(s) for s in solutions]))
Exemplo n.º 2
0
def latex_polynomial(expression):
    """Returns the LaTex representation of the given polynomial expression"""
    return weblatex.escape_latex_for_web(sympy.latex(expression))