Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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.

share|improve this question

marked as duplicate by Jens, Sjoerd C. de Vries, Ajasja, m_goldberg, Yves Klett Feb 11 '13 at 10:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 10 down vote accepted

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:

share|improve this answer
Excellent, works great. Thanks! – icurays1 Feb 10 '13 at 19:26

Use ToString:-

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

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