Re: HoldForm, TraditionalForm Bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg88704] Re: [mg88664] HoldForm, TraditionalForm Bug?
- From: Carl Woll <carlw at wolfram.com>
- Date: Tue, 13 May 2008 07:09:58 -0400 (EDT)
- References: <200805120843.EAA21243@smc.vnet.net>
David Park wrote: >Here is a polynomial. Mathematica rearranges the order of the terms. > >x y - x^3 - 1 >-1 - x^3 + x y > >I would like to display the polynomial without rearranging the order. So I >use a HoldForm. > >HoldForm[x y - x^3 - 1] >x y-x^3-1 > >But then I would also like to display it with TraditionalForm to obtain the >single character italics. So I use: > >HoldForm[x y - x^3 - 1] // TraditionalForm >-x^3+y x-1 (actually TraditionalForm but the terms rearranged) > >I regard it as a bug that Mathematica rearranges the order of the terms in >this expression. Furthermore, if the expression were used in a Plot label, >TraditionalForm is now automatically used and the terms will be rearranged. > >A workaround is to use: > >Style[HoldForm[x y - x^3 - 1], SingleLetterItalics -> True, > FontFamily -> "Times"] >x y-x^3-1 (looks like TraditionalForm) > >If I try to use this in a plot it is quite convoluted! > >ContourPlot[x y - x^3 + 1 == 0, {x, -5, 5}, {y, -10, 15}, > Exclusions -> {x == 0}, > PlotLabel -> (Style[HoldForm[V[x y - x^3 - 1]], > SingleLetterItalics -> True, FontFamily -> "Times"] // > StandardForm)] > > > > You could use: PolynomialForm[HoldForm[V[x y - x^3 - 1]], TraditionalOrder -> False] to prevent TraditionalForm rearrangement. Carl Woll Wolfram Research
- References:
- HoldForm, TraditionalForm Bug?
- From: "David Park" <djmpark@comcast.net>
- HoldForm, TraditionalForm Bug?