Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superscript of \sum cannot be rendered properly #2221

Closed
memakura opened this issue Oct 18, 2019 · 6 comments
Closed

Superscript of \sum cannot be rendered properly #2221

memakura opened this issue Oct 18, 2019 · 6 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3.0

Comments

@memakura
Copy link

When I use \sum_{i=1}^{n} x_i without other equations, it seems the superscript n cannot be rendered properly. (n becomes a subscript together with i=1.)
But when I use the equation with other symbol, such as \int_a^b, it works.

<!DOCTYPE html>
<html lang="en-US">
<head>
    <script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script"></script>
    <!-- <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS_CHTML"></script> -->
</head>
<body>

<p>When I use only this line, the superscript in \(\sum_{i=1}^{n} x_i\) does not work.</p>
<!-- <p>When I use only this line, the superscript in \(\sum_{i=1}^{n} x_i, \int_a^b\) works.</p> -->

<!-- <p>\(\int_a^b\) has no problem.</p> -->

</body>
</html>
@dpvc
Copy link
Member

dpvc commented Oct 19, 2019

I have made a pull request that resolves this problem.

dpvc added a commit to mathjax/MathJax-src that referenced this issue Nov 17, 2019
Fix operator with movable limits when no other super- or subscripts are used.  mathjax/MathJax#2221
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Nov 17, 2019
@YohnWang
Copy link

I have found that \prob has the same problem in inline math.
And wherever \int_a^b occur ,this problem will disappear.

@dpvc
Copy link
Member

dpvc commented Nov 29, 2019

@YohnWang, yes, any operator will show the same issue. It is taken care of in the pull request listed above.

@owlstead
Copy link

It still seems a problem on GitHub itself, probably due to using an older implementation. However, there seems to be a workaround: use \sum\limits_{i=0}^n i: $\sum\limits_{i=0}^n i$.

@dpvc
Copy link
Member

dpvc commented Mar 17, 2023

@owlstead, the GitHub issue is a different cause: GitHub is filtering out attributes from the MathJax output and one of the attributes that it removes is critical to the proper placement of the summation sign, which is out of place when that attribute is removed by GitHub. They are using version 3.2.0, which is relatively recent, and does not have the bug reported here. The GitHub problem is a different cause.

@owlstead
Copy link

@dpvc Ah, yeah, wrong repo I guess, I found a further discussion here. Not sure why that isn't a bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3.0
Projects
None yet
Development

No branches or pull requests

4 participants