# To control spacing between x and y automatically in math mode

I want to control the every spacing between variable like x and y in math mode. I know that thickmuskip and thinmuskip can control the spacing between binary operations and relations, but I don't know how to automatically control the spacing between letter and letter, such like between $xy$, or letter and number, such like 3x.

• Letters and numbers are math atoms of category ordinary and TeX will not add any space between them. If x is used as binary math operator, then \mathbin{x} can be used (another commands: \mathrel , \mathop, \mathopen, \mathclose, \mathpunct). But this has to be explicitly specified (or hidden in macro markup). – Heiko Oberdiek Feb 17 '17 at 17:42
• I have the same problem and end up writing many \, in order to make equations more readable. However, I doubt that there can be an automatic solution since there are many occasions where you do not want to have additional spaces, for instance in differentials \dd x and so on. – marmot Feb 17 '17 at 17:47
• just as in normal text the space between letters is the choice of the font designer, there is no generic way to change this without changing font. – David Carlisle Feb 17 '17 at 17:47
• @David Carlisle: because (a) I want to make things more readable and (b) LaTeX is designed for mathematics and not so much physics notation. Just to give an example, mathematicians write integrals as <code>\int f(x) \dd x</code> (which I'd personally prefer to write as <code>\int f(x)\,\dd x</code>) but physicists write this as <code>\int\dd x f(x)</code>, which I fine-tune to <\code>\int\!\dd x\,f(x)</code>. That is, the space after the integral sign is perfectly reasonable for mathematician's notation, but not so much for physicists notation. – marmot Feb 17 '17 at 17:59
• @David Carlisle: Well, I also prefer to write x\,y\,z if I mean to abbreviate x\cdot y\cdot z, just as one does on blackboards. I feel that this makes equations more readable, but I understand that others have different feelings. (On the blackboard I also add these spaces, and, according to my philosophy, typed text should resemble the text on the blackboard as much as possible. Yet, clearly there are other philosophies, and probably it is hard to decide if one is better than another.) – marmot Feb 17 '17 at 18:10