Hello
Can you please help with the following?
I attempt to bring some equations written in LaTeX into Mathematica by utilizing the 'ToExpression' command. Some of the problems I encounter may be illustrated by considering a simple example below.
Suppose the LaTeX code produces the following expression
i \[HBar] \[PartialD]\[Psi]/\[PartialD]t
Copy-Paste into Mathematica results in
In[38]:= ToExpression["I \\hbar \\dfrac{d}{d t} \\psi", TeXForm]
Out[38]= Id/(d t \[Psi])
Clearly, the last line shows the following problems with 'ToExpression' command 1. It doesn't recognize the \hbar symbol from LaTeX (also it doesn't recognize the partial derivative symbol, \partial, which were replaced by ordinary derivatives). 2. Inserts \Psi under into the denominator.
The following line shows that putting brackets around \dfrac would solve 2., but not 1., as I have just replaced \hbar with 'h'.
In[39]:= ToExpression["I h (\\dfrac{d}{d t}) \\psi", TeXForm]
Out[39]= I \[Psi] h[d/dt]
We now observe that new problem have emerged 3. \psi is written in the left and not on the right side of the derivative, as intended.
Can you please suggest better methods to generate the expression I intended to create?
Thanks