I'm trying to display the text $y+\tau\theta$ using the following graphics directive inside a Show[] with several other graphics objects:

Graphics3D[{FontSize -> 28, Text[y + \[Tau]\[Theta], {1, 0.1, .5}]}]

However, the displayed text is shown as $\tau\theta+y$ instead of $y+\tau\theta$. This isn't a huge deal, but I'm trying to keep my notation consistent. If I enclose the text in quotes, it displays it in the correct order but in "text" font instead of "math" font. Any suggestions? I'm using version 8, if it makes a difference.


Generally, Mathematica likes to keep things in a canonical form by commuting any commutable operators to put things in lexicographic order. This greatly improves the speed with which it can determine whether two expressions are equivalent, but it can be annoying when you want things to appear exactly in the order you originally wrote them.

In this case, you can easily prevent this by using a Hold. Since we're most interested in keeping the display the same, we use HoldForm like so:

  • $\begingroup$ Excellent, works great. Thanks! $\endgroup$ – icurays1 Feb 10 '13 at 19:26

Use ToString:-

Graphics3D[{FontSize -> 28, 
  Text[ToString[y + \[Tau]\[Theta]], {1, 0.1, .5}]}]
  • $\begingroup$ Or use HoldForm $\endgroup$ – Szabolcs Feb 10 '13 at 19:24
  • $\begingroup$ ToString[] seems to do the same thing as putting it in quotes - It makes the $y$ text font instead of math font. $\endgroup$ – icurays1 Feb 10 '13 at 19:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.