# type summation symbol in math.stackexchange [duplicate]

Possible Duplicate:
FAQ for math.stackexchange

Suppose that I want to sum p(xi)*log(p(xi)) from one to n. How can I type it using LaTeX? Please help me guys. I want to type it on math.stackexchange.com.

## marked as duplicate by Jeff AtwoodJan 22 '12 at 1:36

• \sum_{i=1}^n p(x_i)\log p(x_i) $\to \sum_{i=1}^n p(x_i)\log p(x_i)$. – Rahul Dec 30 '11 at 10:24
• You have to surround math with dollar signs to have it render: $\sum_{i=1}^n p(x_i)\log p(x_i)$. Also, take a look at How do I type math in my question/answer/comment? And it would help if you gave a little more information than just "it does not work". – Rahul Dec 30 '11 at 10:40
• If this question is due to this post here's why you had trouble: you shouldn't put blanks in front of the dollars (a line starting with four blanks gives a code block). The line containing the first formula was perfectly okay, up to those blanks. – t.b. Dec 31 '11 at 3:35