Created
February 15, 2024 10:14
-
-
Save rezamarzban/d27a5ba2e806999615146cfc72d5ae12 to your computer and use it in GitHub Desktop.
LaTeX output of sympy formulas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment