# Space fraction vertically

I have an

$$y=e^{\frac{a}{2}}$$


But I do not like the fraction line that partially overlaps with the 2. How can I solve it?

• You can write y=e^{a/2} instead.
– sodd
Dec 18, 2016 at 14:48
• Use e^{a/2}; two story fractions in exponents should be avoided. Dec 18, 2016 at 14:49
• or \exp(\frac{a}{2}) Dec 18, 2016 at 14:56
• Use $...$instead of $$...$$ Dec 18, 2016 at 17:29

Here's a list of possibilities: The very first term is from your code. The second one use a \mathstrut directive inside the denominator to increase the vertical offset at which the entire \frac term is placed. The third solution uses inline fractional notation instead of \frac. The final two solutions use \exp(...) notation, where the material inside the parentheses can be either a \frac expression (with slightly enlarged parentheses) or an inline fraction expression. The parentheses around the \tfrac{a}{2} term are optional.

Choose whichever form you like best. Of course, what's "best" should depend in no small part on whether the equation appears in display math or in inline math material.

\documentclass{article}
\usepackage{amsmath} % for "\tfrac" macro
\begin{document}
$y = e^{\frac{a}{2}} % original form = e^{\frac{a}{2\mathstrut}} % \mathstrut method = e^{a/2} % infix fraction = \exp\bigl(\tfrac{a}{2}\bigr) % \exp notation with \frac = \exp(a/2) % \exp notation with infix fraction$
\end{document}

• An empty subscript does nothing; it's an empty superscript that pushes the subscript a bit down. Dec 18, 2016 at 21:22
• I think you don't need parenthesis in \exp \tfrac{a}{2}.
– yo'
Dec 18, 2016 at 21:23
• @yo' - I've added a sentence to mention that the parentheses may be omitted when using \exp notation.
– Mico
Dec 18, 2016 at 21:43

You can force displaystyle although in this case may be a bit too large for your argument. You can try

$$y= e^{\displaystyle\frac{a}{2}}$$


which yields to But as @egreg said, fractions in exponent are neither usual nor recommended. Perhaps you may want to try something like this

$$y=e^a/2$$


with that, you can achieve something like this that you may like more.

• Please, why do you believe the font size change is any useful? I ask sincerely, I want to know the source of this belief so that I can help getting rid of it.
– yo'
Dec 18, 2016 at 21:22
• I would heartily discourage ever setting an exponent in \displaystyle or \textstyle. The resulting formula is at least ambiguous. I find the first form appalling, to be honest, the second one is just wrong. Dec 18, 2016 at 21:39