Nasser M. Abbasi
2009-10-29 08:11:01 UTC
Version 7.
Some Latex commands are converted ok to Mathematica expressions, such as:
ToExpression["\\sqrt{3}", TeXForm]
ToExpression["\\frac{a}{b}", TeXForm]
But the next Latex "sum" command does not seem to work. Is this a known
"issue" or is there a trick for one command?
I take the output of the TexForm command, and then try to convert it back to
Mathematica expression, but the conversion back fails:
s = TeXForm[Sum[f[n], {n, 1, m}]]
ToExpression[ToString[s], TeXForm]
Even when I type the Latex output by hand, it does not work:
ToExpression["\\sum_{n=1}^m f(n)", TeXForm]
the error is :
Syntax::sntxi:Incomplete expression; more input is needed.
ToExpression::esntx:Could not parse \sum_{n=1}^m f(n) as Mathematica input.
--Nasser
Some Latex commands are converted ok to Mathematica expressions, such as:
ToExpression["\\sqrt{3}", TeXForm]
ToExpression["\\frac{a}{b}", TeXForm]
But the next Latex "sum" command does not seem to work. Is this a known
"issue" or is there a trick for one command?
I take the output of the TexForm command, and then try to convert it back to
Mathematica expression, but the conversion back fails:
s = TeXForm[Sum[f[n], {n, 1, m}]]
ToExpression[ToString[s], TeXForm]
Even when I type the Latex output by hand, it does not work:
ToExpression["\\sum_{n=1}^m f(n)", TeXForm]
the error is :
Syntax::sntxi:Incomplete expression; more input is needed.
ToExpression::esntx:Could not parse \sum_{n=1}^m f(n) as Mathematica input.
--Nasser