I have a piece of python code that outputs latex code. I'm trying to call the python source block from within a latex source block so it will format the output as latex when I export.
Any idea how to do this? I was hoping something similar to the below would work.
#+name: gradient_potential
#+BEGIN_SRC python :exports none :results output
from sympy import symbols, sqrt, diff, latex
x, y = symbols('x y')
U = x * y
print(latex(diff(U, y)))
#+END_SRC
#+begin_export latex
\begin{align}
#+CALL: gradient_potential() :results output
\end{align}
#+end_export