       Re: Latex and \sum

• To: mathgroup at smc.vnet.net
• Subject: [mg77072] Re: Latex and \sum
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Sat, 2 Jun 2007 04:23:20 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <f3of1o$ong$1@smc.vnet.net>

Martin Grossman wrote:
> Hi there,
>
> In Mathematica 6 I am having trouble using command
> ToExpression["input", TeXForm].
> I want to use LaTex sign sum : \sum
> When I used ToExpression["\\sum _{i=a}^b x_i",TeXForm] it doesnt work.
> Other symbols like \frac{}{}  work... Any solution?
>
> Thanks
> martin grossman
>

The issue, though that does not solve the problem, seems to be related
to the way Mathematica parses the "i=a" part.

In:= ToExpression["\\sum_{i}^b x_i", TeXForm]

Out= Sum[Subscript[x, i], {i, 1, b}]

In:= ToExpression["\\sum_{i=1}^b x_i", TeXForm]

During evaluation of In:= ToExpression::esntx:Could not parse \
\sum_{i=1}^b x_i as Mathematica input.

Out= $Failed In:= ToExpression["\\sum_{a}^b x_i", TeXForm] Out= b*Subscript[x, i] In:= ToExpression[ToString[\sum _ {n = 1}^m n^2], TeXForm] During evaluation of In:= ToExpression::esntx:Could not parse \sum \ _{n=1}^m n^2 as Mathematica input. Out=$Failed

In:= ToExpression[
ToString[\frac {(x + y)^2} {\sqrt {x y}}], TeXForm]

Out= (x + y)^2/Sqrt[xy]

Regards,
Jean-Marc



• Prev by Date: Re: How-to's in v6 ???
• Next by Date: Re: NestListEffects function not working in 6.0
• Previous by thread: Latex and \sum
• Next by thread: Re: Latex and \sum