MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: latex and mathematica


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12349] Re: latex and mathematica
  • From: "P.J. Hinton" <paulh@wolfram.com>
  • Date: Sun, 10 May 1998 02:04:32 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6itifb$1d6@smc.vnet.net>

On 7 May 1998, Tony NICOLAS wrote:

> I want give some cell from mathematica and input there in latex document
> 
> any idea is appreciated,  thanks

Converting individual cells from Mathematica syntax to TeX syntax may be
done by calling TeXForm[]

In[1]:= x^2 + 3 == Sin[x] // TeXForm

Out[1]//TeXForm= 3 + {x^2} = \sin (x)

If you have more complicated formulae, you can convert the expression
into boxes before wrapping TeXForm:

In[2]:= ToBoxes[Expand[(x+y)^10]] // TeXForm

Out[2]= \MathBegin{MathArray}{l}
{x^{10}}+10\ {x^9}\ y+45\ {x^8}\ {y^2}+
   120\ {x^7}\ {y^3}+210\ {x^6}\ {y^4}+252\ {x^5}\ {y^5}+  \\
   \noalign{\vspace{0.604167ex}}
\hspace{1.em} 210\ {x^4}\ {y^6}
   +120\ {x^3}\ {y^7}+45\ {x^2}\ {y^8}+10\ x\ {y^9}+{y^{10}}\\
   \MathEnd{MathArray}

If the kernel is connected to a front end, then TeXForm will use the
automatic linebreaking features in the front end typesetting system tio
compute how the equations should be broken.

The output from converted boxes can contain special macro names, which
are defined in notebook.sty and notebook2e.sty.

The latest versions of these files are always available to licensed
users of Mathematica free of charge at URL:

	ftp://ftp.wolfram.com/pub/outgoing/TeXSave/

--
P.J. Hinton
Mathematica Programming Group           paulh@wolfram.com Wolfram
Research, Inc.                  http://www.wolfram.com/~paulh/
Disclaimer: Opinions expressed herein are those of the author alone.




  • Prev by Date: Re: Chemical notation
  • Next by Date: Re: graphics question
  • Prev by thread: latex and mathematica
  • Next by thread: Re: latex and mathematica