# Usage of curly braces in math mode for macros [duplicate]

I wanted to know what is the preffered way of writing macros which accept parameters. So what is a more correct way: \frac 1 2 or \frac{1}{2}?

I think that the former should be preffered in most cases, as the code will work if there is only one symbol and it especially help the readability of code in cases of $\vec e_i$ instead of $\vec{e}_i$ as $\vec{e_i}$ would not typeset the math correctly.

So what do people usually do in such cases?

-

## marked as duplicate by yo', lockstep, David Carlisle, zeroth, Stefan Kottwitz♦Jan 27 '13 at 23:16

Teaching \frac 1 2 to newbies can make them think that \frac 1 10 is good input. –  egreg Jan 27 '13 at 22:31
To me, \vec e_i makes it look like \vec applies to all of e_i, as if it were \vec{e_i}. But, as you note, \vec e_i actually typesets the same as \vec{e}_i, not \vec{e_i}. –  Henry DeYoung Jan 27 '13 at 22:42