Hi and thanks in advance for your help. I'm trying to get nice math formatting mixed with sympy expressions. I'm using jupyter-notebook.
I can get latex and nice sympy printing on separate lines, but can't seem to figure out a way to combine them into one line. The code below prints three lines; the third line should be the combination of the first two. Hopefully there is an elegant solution that I haven't figured out (bit of a Python noob).
import sympy as sym
from IPython.display import display, Math
sym.init_printing()
x = sym.symbols('x')
expr = sym.sqrt(3) * x**3
display(Math('\\frac{1}{2} ') )
display(expr)
display(Math('\\frac{1}{2} %s' %expr) )