MathGroup Archive 2003

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

Search the Archive

Re: TraditionalForm output and subscript variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41524] Re: TraditionalForm output and subscript variable
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Sat, 24 May 2003 01:05:32 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/23/03 at 3:28 AM, BlimbaumJE at ncsc.navy.mil (Blimbaum Jerry DLPC)
wrote:

>I use TraditionalForm for output........but i notice certain outputs
>concerning subscript variables that puzzle me.....and also arent' what
>i want.....example... (where Subscript variable gotten from using the
>Palette)...

>ab*Cos[t]   gives output of ab Cos[t].........however....

>a_Subscript_b*Cos[t]    gives output of Cos[t]  
>a_Subscript_b......which is an example of what I dont want...i 

>Some other examples are:

>a_Subscript_b*?[t]  (where ? is the letter 't' or higher in the
>alphabet)....outputs..... a_Subscript_b ?[t].......whereas

>For ? lower then 't'....the output is   ?[t] a_Subscript_b.....which
>is again not what I want as the Traditional Form output.....

>Any explanations for these results or just a Mathematica quirk?..

For operators like Times with the attribute Orderless, I believe Mathematica orders the output display alphabetically. In your first example a_Subscribt_b*Cost[t], a_Subscript_b has Head = Subscript and Cos[t] has Head = Cos. C comes before S so Mathematica orders the output display as Cos[t]*a_Subscript_b.

For your second example, ?[t] has Head = ?. So, when ? is a letter that comes before S you get the subscripted variable at the end and when ? is a letter that comes after s you get the subscripted variable at the beginning.

As for why expressions might be displayed this way, I would expect comparisions of two expressions to be greatly simplified and faster if the expressions are stored in a standard way. Obviously, the simplest way to display a stored expression would be to output its elements in the order stored.


  • Prev by Date: Re: how implement sets
  • Next by Date: Re: Re: transform a function
  • Previous by thread: Re: TraditionalForm output and subscript variable
  • Next by thread: RE: TraditionalForm output and subscript variable