# How to properly subscript in a superscripted fraction?

the title says it all. It attached a MWE to display the different relative sizes of a subscript within a normal fraction and a superscripted fraction. As you can see, in the superscripted fraction the subscripted letters have the same size as the other letters. How can I change them to be smaller?

  \documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
$e^\frac{E_{A}}{k_{B} T}$
$\frac{E_{A}}{k_{B} T}$
\end{document}

-

\displaystyle won't help you here, since your fraction is in the exponent.

a recommended approach when $e$ is involved is to use the operator name "exp":

$\exp\left(\frac{E_{A}}{k_{B} T}\right)$


\exp is already defined in plain tex and latex.

-
I have seen similar style even when representing $2^{...}$ as $\exp_2(...)$, like an analogue of \log_2. –  Aditya Sep 17 '11 at 19:30
@Aditya -- eek! i think this is going a bit far ... it certainly isn't a recommendation in swanson's mathematics into type, whereas \exp for the exponential function definitely is. –  barbara beeton Sep 17 '11 at 20:23

Two-story fractions in exponents are not recommended; it's better to use the slash form

$e^{E_{A}/(k_{B}T)}$


or maybe

$\exp(E_{A}/(k_{B}T)$


are clearer.

-
The nath can automatically do that, but the display equations part of nath clashes with amsmath. I wish someone would copy the other goodies from nath into a package that does not clash with amsmath. –  Aditya Sep 17 '11 at 19:29
Two-story fractions in exponents are not recommended by whom? I personally like them better than the slash form in most circumstances, just not in inline math. — What I'd recommend is to not write the Boltzmann constant k_{B}, but that's for the sake of the physics involved rather than for typographic reasons. –  leftaroundabout Sep 18 '11 at 0:25
@leftroundabout For instance, the TeXbook, pages 140 and 141; exercise 17.1, in particular. It's just a matter of opinion, though. I don't like them, so we're even. :) –  egreg Sep 18 '11 at 0:31

As others have already pointed out, if the code snippet

$e^\frac{E_{A}}{k_{B} T}\frac{E_{A}}{k_{B} T}$


is processed in TeX's inline math mode (as above), you can't get the subscripts A and B to be typeset in an even smaller font size becausethey're already at their smallest possible size. If for some reason you can't follow the advice provided by some of the other answers, I suggest you try the following. A reason the typeset formula is a bit hard to parse/read is that the horizontal space between the E and subscript A, and between the k and the subscript B is quite large. (This happens because both subscripts happen to be uppercase letters with bottom serifs that stick quite out to the left.) This can be remedied nicely by putting a negative thinspace, \!, before each of the subscripts' arguments, as follows:

$e^{\frac{E_{\!A}}{k_{\!B} T}}t\frac{E_{\!A}}{k_{\!B} T}$


IMHO this looks much easier to parse (when it's typeset, of course!).

-

If you don't need to be in inline math mode you should use display math mode $. Another way to make it clearer would be to add a \left( and \right) which will place a re-sizing parenthesis around the exponent.  \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \[e^\frac{E_{A}}{k_{B} T}$
$e^{\left(\frac{E_{A}}{k_{B} T}\right)}$
$\frac{E_{A}}{k_{B} T}$
\end{document}


Alternatively you could use

\DeclareMathSizes{display size}{text size}{script size}{scriptscript size}


in your preamble to adjust the size globally of each component.

-

It's worth mentioning the nccmath package; you can find documentation here. This allows you to get different size fonts into fractions, binomials, matrices, etc. I've put them line by line for comparison. With respect to fractions the \dfrac command seems to resolve your issue. The problem which arises when the exponent crowds out the base can be solved as mentioned by egreg: putting the argument in exp()

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{nccmath}
\begin{document}
$e^\frac{E_{A}}{k_{B} T}$\\\\
$e^{\mfrac{E_{A}}{k_{B} T}}$\\\\
$e^{\dfrac{E_{A}}{k_{B} T}}$\\\\
$\frac{E_{A}}{k_{B} T}$\\\\
$\mfrac{E_{A}}{k_{B} T}$\\\\
$\dfrac{E_{A}}{k_{B} T}$\\\\
$\exp\left(\dfrac{E_{A}}{k_{B} T}\right)$\\\\
\end{document}

-
Before you use nccmath, please see minipage content overlaps with text before that if nccmath is used and nccmath affecting minipage widths. I was using nccmath but since have eliminated it. –  Peter Grill Sep 18 '11 at 1:51
Thanks, that is good information to be aware of! –  DJP Sep 18 '11 at 2:07