# Doesn't parse when there are more than one \sum or \inf in an equation #984

Closed
opened this Issue Dec 25, 2014 · 2 comments

Projects
None yet
2 participants

### Issue Summary

When using the library for my webpage, I notice that if there are more than one \sum or \inf notations in a single equation, library will not render the result.

### Cases

For example, this equation can be rendered properly:

$$\bar x = \underset{x}\arg \min \sum_{i=1}^{n} \left( x - x_i \right)$$

But when there are two \sum in a equation, MathJax won't work:

$$SE = \sum_{j=1}^{\infty} \sum_{k=1}^{\infty} x_{jk}$$

The same thing happens when two \int are used in a equation:

$$w = \int_{0}^{\infty} \int_{0}^{\infty} x \mathop{dx}$$

Even the combination of \inf and \sum will not produce a proper result.

### Environment

I use MathJax library by including the script:

<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Member

### dpvc commented Dec 26, 2014

 This type of problem is frequently due to the content management system you are using interfering wit the TeX code. I suspect that your system uses the underscore (_) to indicate italics when it appears at the beginning and ending of a phrase, and that in the second and third equations the underscores cause a portion of the math to be converted to ... or a similar construction, while the first does not. The difference between them has nothing to do with the \int or \sum, but with what precedes and follows the _. In the first equation, the second underscore is between two letters (not considered the end of a word), while in the other two, it is followed by a brace (a non-letter). This is not a MathJax issue, but a problem with your content management system. You may be able to get around it by escaping the underscores (e.g., \_), but it will depend on the system you are using. You may also be able to put the math into a "verbatim" mode (if your system has one) so that it will not alter the contents of the LaTeX notation.

### bitmingw commented Dec 29, 2014

 By escaping \_ the system can render equations correctly, thank you!