I need to convert some LaTeX code to mathematica expressions. So far I have used
ToExpression["ab", TeXForm]
yielding ab
, i.e. mathematica variable with the name "ab". This is what I want. However, the LaTeX code I would like to convert may be e.g. "2 ab".Using
ToExpression["2 ab", TeXForm]
then returns 2 a b
, i.e. a product of a
and b
. How can I avoid this?