       Re: TeXForm

• To: mathgroup at smc.vnet.net
• Subject: [mg132014] Re: TeXForm
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Fri, 15 Nov 2013 18:37:04 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-outx@smc.vnet.net
• Delivered-to: mathgroup-newsendx@smc.vnet.net

On 11/15/13 at 6:40 AM, tmatsoukas at me.com (Themis Matsoukas) wrote:

>TeXForm seems to apply additional transformations to expressions
>before exporting into latex. Here is an example:

>((-1 + n + \[Phi] - n \[Phi]) a + (1 + (-1 + n) \[Phi]) b)/((-1
>+ n + \[Phi]) a + b - \[Phi] b) // TeXForm
>\
>\frac{a (n (-\phi )+n+\phi -1)+b ((n-1) \phi +1)}{a
>(n+\phi -1)+b (-\phi )+b}

>The exported expression has been manipulated by some unknown rules.
>The  (-\phi) in particular is especially annoying. Is there a way to
>export the expression in the form that pretty much matches the
>original expression?

This isn't an issue with TeXForm. It is fundamental to the way
Mathematica is designed.

Note that

((-1 + n + \[Phi] - n \[Phi]) a + (1 + (-1 + n) \[Phi]) b)/((-1 +
n + \[Phi]) a + b - \[Phi] b)//TraditionalForm

has the same (-\phi) you are objecting to in it. Mathematica is
evaluating your expression into a canonical form then giving
that to TeXForm with the result you see.

From other posts showing how to get Mathematica to display
expressions in specific form, I am confident there is a way to
work around this issue. But, all of the posts I've seen forcing
Mathematica to display expressions in something other than
Mathematica's preferred canonical form seem to me to be more
effort than simply either living with the result or in this case
manually editing the result from TeXForm. Here I assume you want
the TeXForm expression for use in something other than Mathematica.



• Prev by Date: Re: Plot InverseSurvivalFunction
• Next by Date: Implementation of Discrete Spherical Harmonic Transforms with Mathematica?
• Previous by thread: Re: TeXForm
• Next by thread: Re: TeXForm