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

Autonumbering and binomial coefficient #1194

Closed
kaba2 opened this Issue May 24, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@kaba2
Copy link

kaba2 commented May 24, 2015

In the TeX converter, using autoNumber: "all" garbles the binomial coefficient \binom{k}{i}:

binomial

There is even an additional equation number. The source is:

<script type="math/tex; mode=display">\binom{k}{i}</script>

The problem is fixed by removing autoNumber: "all".

@pkra

This comment has been minimized.

Copy link
Member

pkra commented May 25, 2015

Thanks for reporting. Please check https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md for future reports.

@dpvc I can reproduce this on FF38 and Chrome 43 with http://jsbin.com/qiyucagume/2/edit. Both HTML-CSS and SVG output are affected. I'm guessing this is a problem with mathchoice?

@pkra pkra added the Accepted label May 25, 2015

@dpvc

This comment has been minimized.

Copy link
Member

dpvc commented May 25, 2015

It's actually not the \mathchoice directly, but the handling of a parsing process internally to set up the \mathchoice calls for the parentheses. Here is a temporary work-around: put

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: {Augment: {
    mathPalette: function (fence,side) {
      if (fence === '{' || fence === '}') {fence = "\\"+fence}
      var D = '{\\bigg'+side+' '+fence+'}', T = '{\\big'+side+' '+fence+'}';
      return MathJax.InputJax.TeX.Parse('\\mathchoice'+D+T+T+T,{}).mml();
    }
  }}
});
</script>

before the script that loads MathJax.js itself.

@dpvc dpvc added this to the MathJax v2.6 milestone May 25, 2015

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jul 8, 2015

dpvc pushed a commit to dpvc/MathJax that referenced this issue Jul 9, 2015

@dpvc

This comment has been minimized.

Copy link
Member

dpvc commented Jul 9, 2015

=> Merged

@dpvc dpvc added Merged and removed Ready for Review labels Jul 9, 2015

@dpvc dpvc closed this Jul 9, 2015

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Aug 16, 2015

@dpvc dpvc added Test Available and removed Test Needed labels Aug 16, 2015

@dpvc

This comment has been minimized.

Copy link
Member

dpvc commented Aug 16, 2015

=> in testsuite

LaTeXToMathML/references/issue1194.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment