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, 2013 at 12:43
• Sorry @Mico I should have put the package link Aug 16, 2013 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.

• For some reason, the slash does not display as large as it shows in this solution (it doesn't have the same size as the surrounding elements). Have no idea why... May 11, 2021 at 10:31
• @capadocia Hard to tell. Compiling the displayed document under pdflatex or lualatex on my computer gives the shown output. If you have loaded other packages, then the output is can be different as they may change the fonts. It might be relevant to ask a new question, showing the set-up you are using. May 11, 2021 at 14:26

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. May 2, 2016 at 8:35