10

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}

6 Answers6

7

\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.

egreg
  • 1,121,712
  • 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
  • 2
    @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
3

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.

egreg
  • 1,121,712
  • 1
    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 00: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 00:31
2

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!).

Mico
  • 506,678
1

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.

Peter Grill
  • 223,288
1

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}
David Carlisle
  • 757,742
DJP
  • 12,451
0

I had the same problem with subscript/superscript, I made a package to make my life easier. You can easily put fraction in super and sub script.

I made a Webpage to explain the package. It's design for actuarial symbol but the output for your problem seem really nice with it.

All you need is the actuarialsymbol package.

At the beginning of the code you have to write

\usepackage{actuarialsymbol}

The arguments of the function to write sub/superscript

\actsymb['subscripL']['superscriptL']{<middle>}{'subscriptR'}{'superscriptR'}

Example of output:

\actsymb{e}{}[\frac{E_{A}}{k_{B}}]

enter image description here

The CTAN : http://ctan.org/pkg/actuarialsymbol