I am trying to use the following python code
Solved (Hint by @TheFool): By putting latex() into the print function it works.
from sympy import * from sympy.printing.mathml import mathml init_printing(use_unicode=True) # allow LaTeX printing # independent variables x, y, z = symbols('x y z', real = True) # parameters nu, rho = symbols('nu rho', real = True, constant = True, positive = True) # dependent variables u, v, w = symbols('u v w', real = True, cls = Function) print(latex(diff(u(x,y,z),x))) The output looks like '\\frac{\\partial}{\\partial x} u{\\left (x,y,z \\right )}'.
How can I remove the additional backslashes and the quotation marks at the beginning and at the end of the output?