Re: moving equations between Mathematica and TeXShop
- To: mathgroup at smc.vnet.net
- Subject: [mg115778] Re: moving equations between Mathematica and TeXShop
- From: "Michael B. Heaney" <mheaney at alum.mit.edu>
- Date: Thu, 20 Jan 2011 06:32:00 -0500 (EST)
Dear Murray, Thank you for your help. Here is an equation I typed into Mathematica: In[1]:= (2 m^2 =CF=83^2 Exp[-(( 2 m^2 =CF=83^2 (((x - Subscript[x, i]) - Subscript[v, i] (t - Subscript[t, i]))^2 + (y - Subscript[y, i])^2))/( 4 m^2 =CF=83^4 + =E2=88=87^2 (t - Subscript[t, i])^2))])/(=CF=80 (4 m^2 =CF=83^4 + =E2=88=87^2 (t - Subscript[t, i])^2)) And here is the output form of the same equation; Out[1]== (2 E^(-((2 m^2 \[Sigma]^2 ((x - (t - Subscript[t, i]) Subscript[v, i] - Subscript[x, i])^2 + (y - Subscript[y, i])^2))/( 4 m^2 \[Sigma]^4 + \[HBar]^2 (t - Subscript[t, i])^2))) m^2 \[Sigma]^2)/(\[Pi] (4 m^2 \[Sigma]^4 + \[HBar]^2 \ (t - Subscript[t, i])^2)) And here is the "copy as LaTeX" form of the preceding equation: \frac{2 e^{-\frac{2 m^2 \sigma ^2 \left(\left(x-\left(t-t_i\right) v_i-x_i\right){}^2+\left(y-y_i\right){}^2\right)}{4 m^2 \sigma ^4+\hbar ^2 \left(t-t_i\right){}^2}} m^2 \sigma ^2}{\pi \left(4 m^2 \sigma ^4+\hbar ^2 \left(t-t_i\right){}^2\right)} The constants in the numerator are not grouped together, the (x-x_i) term has been rearranged, and the velocity term does not preceed the time term. I would like to get the exact same equation into LaTeX as I entered into Mathematica. Suggestions? On Wed, Jan 19, 2011 at 2:23 AM, Murray Eisenberg <murray at math.umass.edu>wrote: > I presume this has nothing to do with TeXShop per se, but rather with > the underlying TeX. > > Can you be more specific as to what kinds of expression need changing, > one way or the other. > > My experience is that Mathematica's TeXForm tends to produce legitimate > TeX math expressions at what I might call a "basic" level and that I can > often hand-code the same thing in LaTeX that is more to my taste. > > On 1/18/2011 5:51 AM, Michael B. Heaney wrote: > > Hi everyone, > > > > I am solving symbolic equations in Mathematica and then exporting these > > equations to TeXShop. The exported equations need lots of changes to look > > like normal mathematical typeset equations in TeXShop. I also export > > equations from TeXShop to Mathematica, and these need lots of changes > before > > they will run in Mathematica. Is there any easier way to move equations > back > > and forth between Mathematica and TeXShop? > > > > Thanks, > > > > Michael > > -- > Murray Eisenberg murray at math.umass.edu > Mathematics & Statistics Dept. > Lederle Graduate Research Tower phone 413 549-1020 (H) > University of Massachusetts 413 545-2859 (W) > 710 North Pleasant Street fax 413 545-1801 > Amherst, MA 01003-9305 > > -- ------------------------------------------------------------ Michael B. Heaney 3182 Stelling Drive Palo Alto, CA 94303 USA mheaney at alum.mit.edu www.linkedin.com/in/michaelbheaney ------------------------------------------------------------