Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

How to convert LaTeX to expression without interpreting variables as products?

$
0
0

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?


Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>