1

I'm having some trouble when trying to correctly display a summation using LaTeX.

I'm using the package mathtools, and the formula:

Cov(O) = \frac{ \sum_{\forall c_i \in C} exists(O, c_i)}{n}

My problem is the \forall c_i \in C text appears as a sub index of the \sum element instead of appearing below it.

egreg
  • 1,121,712
user23527
  • 113

2 Answers2

5

This is standard because the arguments of \frac are in textmode math. Try \frac{\displaystyle ... or \frac{\sum\limits_{....

BTW: One usually never write \forall in the limits of the sum, one would usually just write \sum_{c_i \in C}, the for all is implied

daleif
  • 54,450
2

I would prefer rewriting the text as follows:

\Cov(O) = \frac{1}{n} \sum_{\forall c_i \in C} \texists(O, c_i)

It seems that Cov(0) andexists(0,c_i)` are functions, so it should be typeset as one. For that, add this to the document preamble:

\usepackage{amsmath} % not needed if it's already in the preamble
\DeclareMathOperator{\texists}{exists}
\DeclareMathOperator{\Cov}{Cov}

Notice that we cannot use the name \exists since it already exists ;)

yo'
  • 51,322