# Changing order of TeXForm output

I am creating Taylor polynomials and exporting them using TeXForm. When a polynomial p[x] is displayed in Mathematica, it shows, for instance, 1+x+x^2+x^3. However, TeXForm always reverses the polynomial, giving it with largest power first:

TeXForm[p[x]] = x^3+x^2+x+1.

How can I keep the polynomial in the same order? Taylor polynomials are generally thought of as being constructed from low-to-high powers, so reading them in the generated format is a bit confusing to some.

Use HoldForm:

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

Out[]//TeXForm= 1+x+x^2+x^3


Or for a function p[x] evaluating to a polynomial:

In:= TeXForm[HoldForm[Evaluate[p[x]]]]

Out//TeXForm=
1+x+x^2+x^3

• This works if I copy/paste the output into TeXForm[HoldForm[...]]; I'd rather it be done automatically. Using "TeXForm[HoldForm[p[x]]]" just returns "p(x)". Dec 18, 2012 at 16:48
• How about TeXForm[HoldForm[Evaluate[p[x]]]]? Dec 18, 2012 at 17:19
• Your answer works. If it were a separate answer, I'd accept it; it is more elegant than using an undocumented command. Dec 18, 2012 at 17:45
• Answer edited to add the form for a function p[x]. Dec 18, 2012 at 17:54

You can also use the undocumented (and probably deprecated, so beware!) PolynomialForm.

poly = Expand[(1+x)^10]


• Thanks. This works, but using TeXForm[HoldForm[Evaluate[p[x]]]] is probably better. Dec 18, 2012 at 17:44