MathGroup Archive 2008

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

Search the Archive

Re: Re: LaTex to Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91430] Re: [mg91409] Re: LaTex to Mathematica
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Thu, 21 Aug 2008 04:16:37 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <g8gj47$etf$1@smc.vnet.net> <200808201023.GAA18906@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

I tried something similar, but using ToExpression[...,"TeXForm"], 
likewise removing the trailing "\\" from the original.

(I was surprised that Mathematica just ignored the "&", which is 
evidently in the original expression because that expression is part of 
a larger LaTeX construct such as a \begin{align}...\end{align).

However, I was unable to see how to let Mathematica itself convert the 
single backslashes, which of course are interpreted as escape symbols, 
to the needed double-backslashes.  The obvious thing,

   expr = "\ln{H}^{*} &=  {X}_{1} {\beta}_{1}  + {\alpha}_{1}lnE+ \
{\varepsilon}_{1}";

   expr/. "\"->"\\"

does not work, of course.

Jens-Peer Kuska wrote:
> Hi,
> 
> ImportString[
>    "$ln{H}^{*}&={X}_{1} \
> {\\beta}_{1}+{\\alpha}_{1}lnE+{\\varepsilon}_{1}$",
>    "TeX"] // NotebookPut
> 
> ??
> 
> Regards
>    Jens
> 
> snowrain wrote:
>> Hi all
>> Does anyone know how to convert LaTex file to Mathematica ? 
>> For example, the formula that I typed in LaTex is:  
>> ln{H}^{*} &=  {X}_{1} {\beta}_{1}  + {\alpha}_{1}lnE+ {\varepsilon}_{1}\\
>> If I copy the above LaTex command to Mathematica, it only shows the
>> original LaTex command. I'd like to have symbols for beta, alpha, and also
>> for subscript and superscript. That is, I hope it looks like the pdf file
>> that LaTex produces instead of showing "\beta", "\alpha", etc. 
>> Please advise. 
>> thanks a lot !
>>
>>
>>
>> --
>> Message posted using http://www.talkaboutcomputing.com/group/comp.soft-sys.math.mathematica/
>> More information at http://www.talkaboutcomputing.com/faq.html
>>
>>
> 

-- 
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


  • Prev by Date: Re: Graphing Difference Equation
  • Next by Date: Re: Re: Need a Faster Solution to Number Theory
  • Previous by thread: Re: LaTex to Mathematica
  • Next by thread: Re: LaTex to Mathematica