Is there a convention/rule-of-thumb for the order of writing numbers? When writing mathematical expressions, most of the time it seems that there is an unwritten convention that people tend to stick to concerning the order that numbers are written. For instance,
$$2x \,\,\text{ and not } \,\, x2$$
$$\frac{3}{5}\sqrt{2}\,\,\,\text{and not}\,\,\, \sqrt{2}\frac{3}{5}$$
$$\pi\sqrt{163}\,\,\, \text{and not}\,\,\,\sqrt{163}\pi$$
Then there are more ambiguous cases
$$e\pi \,\,\,\text{or}\,\,\,\pi e?$$
$$2\sqrt{2}\pi \,\,\,\text{or}\,\,\,2\pi\sqrt{2}\,\,\,\text{but not} \sqrt{2}2\pi$$
Now, I don't suspect there is anywhere where this is prescriptively written down (or even that there are rigid rules for every single expression). But I wonder if anyone knows or can think of a good/concise group of rules that manage most expressions, or a good reason this convention is so closely stuck to.
 A: Digits before symbols, and letters in alphabetic order. Other than that, I go with what either looks right, or sounds right when I read it. There may be more rules, but I don't know them.
Also, I would probably do what I can to avoid ambiguity even in the face of potential typos. So I may prefer $\pi e$ instead of $e\pi$ because $e^\pi$ is much more common than $\pi^e$, so writing $\pi e$ makes it that much less likely for readers to suspect a typo when they read it. That may also be why you see people prefer $\pi\sqrt{163}$: it makes it a lot clearer that $\pi$ is not inside the square root even if we suspect typos.
A: There are no hard rules, in various contexts both $2x$ and $x2$ might make sense. For example, suppose that $2$ is a result of simplifying the previous expression, and so you might want to keep it  in the "wrong" order (even if only for a while):
$$\lim_{n \to \infty} \frac{xn}{1+n} \cdot \frac{2n}{2+n} 
= \lim_{n \to \infty} \frac{xn}{1+n} \cdot \lim_{n \to \infty}\frac{2n}{2+n}
= x \cdot 2 = 2x$$
However, there is one rule of thumb that I use and that serves me well:

Balance the complexity of the syntax tree, where the left-branch complexity is penalized much more than the complexity of the right branch.

To explain it, let me give you some context. Math formulas and numbers are usually written left to right and we have lots of non-symmetric conventions, like $y^2$ or $f(x)$ where "additions" like $2$ and $x$ are on the right side of $y$ and $f$ respectively. For this reason $2y^2$ looks much better than $y^22$; in fact, the latter is so uncommon, that I would personally interpret is as a typographical error. Similarly $2f(x)$ looks better than $f(x)2$. Now, if you were to interpret $f$ as the "gravity center" of that formula, then the first is much more balanced.
In fact there is a balancing act involved, namely you balance the complexity of the syntax tree, where the right branch is allowed to be a bit more complicated than the left side. The reason for non-symmetry is that if we read left-to-right, then you need to keep the left side in your mind while you process/parse the right part – it's much easier when the left side is simple. And so, because constants are some of the simplest objects in math, we write them usually on the left, as in $2x$. Yet, that is not always true, e.g. compare these two expressions:
$$\dfrac{\frac{2}{3}}{4+\dfrac{5}{6+\dfrac{7}{8+\frac{9}{10+\frac{11}{12+13}}}}}\cdot f(x)  \hspace{80pt}
f(x)\cdot\dfrac{\frac{2}{3}}{4+\dfrac{5}{6+\dfrac{7}{8+\frac{9}{10+\frac{11}{12+13}}}}}$$
While the big fraction is technically a constant (and so some might like the first version better), I prefer the second version, as the constant's complexity outweighs the complexity of $f(x)$ and probably should be given more focus.
I hope this helps $\ddot\smile$
