Consider two variables defined using sympy in an IPython (Jupyter) notebook:
R_g =Symbol(r'R_{g}')
L_g =Symbol(r'L_{g}')
Imagine I do some mathematical operations and then I end up with a complicated expression, whose features can be illustrated by a simple example as follows:
a=R_g*L_g
print a
This prints:
L_{g}*R_{g}
I want it to print
R_g*L_g
and not
$R_g L_g$
The reason is that I want to copy-paste this expression into a fortran code. It becomes a challenge because I am using Latex to format variables. So I have to format terms that have variables like
IL_np1 =Symbol(r'I_{L}^{n+1}')