# Elegant fractions in one line

What solution do you think is more elegant for a simple fraction that should be displayed in just one line?

My examples are

1. $x_F \equiv \frac{p_z}{p^{\rm MAX}_{z}} = \frac{p_z}{\sqrt{s}/2}$
2. $x_F \equiv \frac{p_z}{p^{\rm MAX}_{z}} = \frac{p_z}{\sfrac{\sqrt{s}}{2}}$
3. $x_F \equiv \frac{p_z}{p^{\rm MAX}_{z}} = \frac{p_z}{^\sqrt{s}/_2}$

This generates the following (using the xfrac package). I don't like 2, but I also think that 3 is not very elegant.

• How is \sfrac defined? Do you enable this command by loading a package? – Mico Aug 16 '13 at 12:43
• Sorry @Mico I should have put the package link – leoredi Aug 16 '13 at 15:01

It is nearly always best to use the slashed form for fractions in the text: \documentclass{article}

\begin{document}
$$x_F \equiv p_z^{}/p^{\mathrm{MAX}}_z = p_z/(\sqrt{s}/2) = 2p_z/\sqrt s$$
\end{document}


Note that I have added brackets to the second fraction.

There is also nicefrac package which provides \nicefrac{<Nr>}{<Dr>}:

\documentclass{article}
\usepackage{nicefrac}

\begin{document}
$$x_F \equiv \nicefrac{p_z}{p^{\mathrm{MAX}}_z} = \nicefrac{p_z}{(\nicefrac{\sqrt{s}}{2})} = \nicefrac{2p_z}{\sqrt s}$$

\vspace{.5cm}        %% Andrew's method for comparison purpose.
$$x_F \equiv p_z^{}/p^{\mathrm{MAX}}_z = p_z/(\sqrt{s}/2) = 2p_z/\sqrt s$$
\end{document} • I think, the slashed form looks better. In particular, it does not require to reduce the font size. – Konstantin May 2 '16 at 8:35