[Tex/LaTex] How to make fractions in powers look good

displaystylefractionspdftex

Quick question. When I type $e^{\frac{1}{2x}}$ it makes the fraction very small and hard to read. However when I type $e^{\displaystyle\frac{1}{2x}}$ it makes the fraction way to big. I guess in either case they do not look good to me. Is there a nice way to make fractions in powers look good?

Best Answer

You can also use the xfrac package which provides \sfrac which works in text and math mode:

enter image description here

Note:

Code:

\documentclass{article}
\usepackage{xfrac}

\begin{document}
Works in text mode \sfrac{1}{2} and in math mode $\sfrac{1}{2}$.

In exponents: $e^{\sfrac{1}{2}}$
\end{document}