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]))
def latex_polynomial(expression): """Returns the LaTex representation of the given polynomial expression""" return weblatex.escape_latex_for_web(sympy.latex(expression))