# summation limits in fractions

• November 2nd 2007, 03:33 AM
optimist76
summation limits in fractions
Hello,
I am using following latex lines to produce my output:

U=\frac{ \sum_{F=1}^{N_F}N_S^{(F)} }{N_S \times N_F}
\label{AvgU}

The problem is that I am getting an output (attached) in which limits of summation are to the right and not exactly above or below. They are all right in equation mode when there is no fraction. I need to number this equation as well. Can I anyone tell me how to get the limits of summation above and below in the above mentioned example keeping in consideration that I have to number the equation as well.
• November 2nd 2007, 03:43 AM
topsquark
$U = \frac{ \begin{matrix} N_F \\ \sum \\ F = 1 \end{matrix} N_S^{(F)} }{N_S \times N_F}$

-Dan
• November 2nd 2007, 03:46 AM
optimist76
it's perfect but have you obtained it using equation environment as I have to number this equation as well.
• November 2nd 2007, 03:49 AM
optimist76
sorry but one more question can I get this (F) directly above N (not as a superscript).
• November 2nd 2007, 04:09 AM
topsquark
$U = \frac{ \begin{matrix} N_F \\ \sum \\ F = 1 \end{matrix} \begin{matrix} (F) \\ N_S \\ ~ \end{matrix} }{N_S \times N_F}$

You can likely pretty this up using different text sizes. Unfortunately I know nothing about the equation command.

-Dan
• November 2nd 2007, 05:47 AM
Krizalid
Tout d'abord, Bienvenue sur le forum! Cheers du Chili!

Quote:

Originally Posted by optimist76
Hello,
I am using following latex lines to produce my output:

U=\frac{ \sum_{F=1}^{N_F}N_S^{(F)} }{N_S \times N_F}
\label{AvgU}

The problem is that I am getting an output (attached) in which limits of summation are to the right and not exactly above or below. They are all right in equation mode when there is no fraction.

Generally, when you put a fraction over another fraction, does not yield the desired. For cases like that, you need to place \displaystyle before to write \sum.

$U=\frac{\displaystyle\sum_{F=1}^{N_F}N_S^{(F)}}{N_ S\times N_F}.$

(Clic on the formula to reveal its code.)

Quote:

Originally Posted by optimist76
I need to number this equation as well.

Could you be more specific?

Are you makin' some of equation alignment? Or you just want to put a number?
• November 2nd 2007, 05:52 AM
optimist76
Actually,whenweuseformat,thereisanautmotaticnumberingofequationsthatisreferredthroughalabel.Theproblemisthis\displaystylecommanddoesnotworkinside.
• November 2nd 2007, 06:20 AM
Krizalid
I found a way

$$U = \frac {\sum\limits_{F = 1}^{N_F}N_S^{(F)} }{N_S \times N_F} \label{AvgU}$$.

The forum does not recognize the command, so try it by your own.
• November 2nd 2007, 06:27 AM
optimist76
@Krizalid
thanks alot it was what I was looking for. and how about producing (F) above letter N (not as super script)?
• November 2nd 2007, 06:31 AM
Krizalid
The following code holds:

\mathop N\limits^{(F)},

which produces $\mathop N\limits^{(F)}.$
• November 2nd 2007, 06:41 AM
optimist76
thanks but if I want to place a subscript in this mode then it also takes it like limits. I was looking for (F) above N and at the same time S as subscript. I tried this one but didn't work
\mathop N_S\limits^{(F)}
,
• November 2nd 2007, 06:45 AM
Krizalid
Quote:

Originally Posted by optimist76
I was looking for (F) above N and at the same time S as subscript. I tried this one but didn't work
\mathop N_S\limits^{(F)}
,

You missed the {}, so the command is \mathop {N_S}\limits^{(F)}, which yields

$\mathop {N_S}\limits^{(F)}.$

As desired $\blacksquare$
• November 2nd 2007, 06:53 AM
optimist76
@Krizalid
Thanks alot. It's working. Is it possible to reduce the sizes of subscripts and powers.
• November 2nd 2007, 08:02 AM
Krizalid
Yes.

The following command holds:

N^{\scriptscriptstyle{(F)}}, this yields $N^{\scriptscriptstyle{(F)}}.$