I have a code in Python that makes some calculations for different reaction-diffusion equations. I am trying to let the user define the variables and parameters of the system.
The problem is that, for instance, I have tried needed to define variables with weird names like munormalform
, because I don't want to use the variable mu
to avoid problems when a user needs to define that variable as a parameter of the system. What happens then is that I need to get some of these variables into Mathematica so I am saving them into .txt
files in a LaTeX form.
After this, I read the file in Mathematica with no problems but, when I have a variable defined as a = "D^{4} \\times munormalform"
and I try to translate it into Mathematica input using b=ToExpression[a,TeXForm]
, I get the following output:
D^4 f l m^3 n o^2 r^2 u