# [texhax] inline form of an equation

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Fri Dec 12 21:37:16 CET 2008

> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{mathptmx}
> \begin{document}
> $\sqrt{\frac{\sum d^2}{2n}}$
> \end{document}
>
> Would it be okay to do:
>
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{mathptmx}
> \begin{document}
> $\sqrt{{\sum d^2}/{2n}}$
> \end{document}

Well, as everyone says, the second, in-line, is clearly more pleasing to the
eye.  But this is more a question of type-setting ethics than hacking TeX
;-)

However, you may want to tweak the spacing a little, like this:

$\sqrt{\sum d^2\!/\,2n}$

And, of course, your extra braces are entirely redundant - I try to avoid
extra braces as it reduces the readability of the input file and also it's
easy to lose a brace when editting.

Cheers,  Phil