Cannot get V3 To Render

195 views
Skip to first unread message

Sean Quallen

unread,
Oct 26, 2019, 4:23:16 PM10/26/19
to MathJax Users
Hello all! I'm a VERY novice user of MathJax so I'm probably missing something simple. However, I cannot get the new script (v3.0) to render. I'm using the snippet provided by the documentation:

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

But nothing is rendering. When I replace with the old script tags everything works just fine:

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML" async="" type="text/javascript"></script>

These are clearly different script calls but I'm too noob to know what to change here. Any assistance would be appreciated!

se...@mathspathway.com

unread,
Oct 28, 2019, 3:54:45 PM10/28/19
to MathJax Users
Hi Sean,

Have you also edited the configuration block to match?
The docs at provide a basic example, and I've found the (reasonably long) guide on upgrading useful. 
I used the conversion tool to help with the initial config setup.

After all of that, I found that I had a bunch of tex that "broke" MathJax v3, so it might be worth checking your javascript console to see if any errors appear. 
The error that I was getting was 't.splitText is not a function', I believe this is related to a known bug, and I have worked around that issue by inserting an extra space between any '>' and my MathJax identifiers of '\(' and '\['.

Good luck,
Sean.

Sean Quallen

unread,
Oct 28, 2019, 5:25:55 PM10/28/19
to MathJax Users
Sean,

Thanks for the response. I've not looked at these documents because I'm not using any advanced functionality and cannot get ANYTHING to render. As an example, this html doc:

<p>Version 2.7:</p>
<p>Basic Text: \(Re\)</p>
<p>Basic Math: \(Re_D = \frac{VD}{\nu}\)</p>
<p>
</p>

produces:

2.7.png


But changing the script in the following:

<p>Version 3.0:</p>
<p>Basic Text: \(Re\)</p>
<p>Basic Math: \(Re_D = \frac{VD}{\nu}\)</p>
<p>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6" type="text/javascript"></script>
<script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
</p>

produces:

3.0.png



This has always 'just worked' with the script tags (I've been using MathJax since v2.5). However I don't see what I'm doing wrong here. Any assistance would be appreciated!

Sean

Davide Cervone

unread,
Oct 28, 2019, 5:59:47 PM10/28/19
to mathja...@googlegroups.com
You v3 example works fine for me.  Are you seeing any error messages in the browser console?

Davide


On Oct 28, 2019, at 5:25 PM, Sean Quallen <seanq...@gmail.com> wrote:

Sean,

Thanks for the response. I've not looked at these documents because I'm not using any advanced functionality and cannot get ANYTHING to render. As an example, this html doc:

<p>Version 2.7:</p>
<p>Basic Text: \(Re\)</p>
<p>Basic Math: \(Re_D = \frac{VD}{\nu}\)</p>
<p>
</p>

produces:

<2.7.png>


But changing the script in the following:

<p>Version 3.0:</p>
<p>Basic Text: \(Re\)</p>
<p>Basic Math: \(Re_D = \frac{VD}{\nu}\)</p>
<p>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6" type="text/javascript"></script>
<script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
</p>

produces:

<3.0.png>



This has always 'just worked' with the script tags (I've been using MathJax since v2.5). However I don't see what I'm doing wrong here. Any assistance would be appreciated!

Sean




On Monday, October 28, 2019 at 12:54:45 PM UTC-7, se...@mathspathway.com wrote:
Hi Sean,

Have you also edited the configuration block to match?
The docs at provide a basic example, and I've found the (reasonably long) guide on upgrading useful. 
I used the conversion tool to help with the initial config setup.

After all of that, I found that I had a bunch of tex that "broke" MathJax v3, so it might be worth checking your javascript console to see if any errors appear. 
The error that I was getting was 't.splitText is not a function', I believe this is related to a known bug, and I have worked around that issue by inserting an extra space between any '>' and my MathJax identifiers of '\(' and '\['.

Good luck,
Sean.

On Sunday, 27 October 2019 07:23:16 UTC+11, Sean Quallen wrote:
Hello all! I'm a VERY novice user of MathJax so I'm probably missing something simple. However, I cannot get the new script (v3.0) to render. I'm using the snippet provided by the documentation:

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

But nothing is rendering. When I replace with the old script tags everything works just fine:

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML" async="" type="text/javascript"></script>

These are clearly different script calls but I'm too noob to know what to change here. Any assistance would be appreciated!

-- 
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/c703f14d-a34c-4b05-85a9-e073421f2396%40googlegroups.com.
<2.7.png><3.0.png>

Sean Quallen

unread,
Oct 28, 2019, 6:26:08 PM10/28/19
to MathJax Users
Davide,

Thanks for the help. I do, indeed, get a console error in Chrome. I've no idea what to do with this error:

tex-mml-chtml.js:1 Uncaught (in promise) TypeError: Cannot set property 'parent' of undefined at a (tex-mml-chtml.js:1) at u (tex-mml-chtml.js:1) at _ (tex-mml-chtml.js:1) at A (tex-mml-chtml.js:1) at new <anonymous> (prototype.js?v=3500.-rel.16+7744aa6:392) at Object.node.<computed> [as text] (tex-mml-chtml.js:1) at l.c.create (tex-mml-chtml.js:1) at r.I.compileError (tex-mml-chtml.js:1) at Object.compileError (tex-mml-chtml.js:1) at r.I.compileMath (tex-mml-chtml.js:1)


However, this error does not exist in MS Edge yet I don't get a rendered math font in Edge. Thanks for the help!

Davide Cervone

unread,
Oct 28, 2019, 6:43:19 PM10/28/19
to mathja...@googlegroups.com
It appears that MathJax is dying within the call that is trying create a "Math input error" message.  

Try adding

<script>
MathJax = {
  options: {
    compileError: function (doc, math, err) {
      console.log(err.message);
      console.log(err.stack)}
  }
}
</script>

before the script that loads MathJax, and see what the console says about that.

Also, can you give the full HTML for the page rather than just this snippet?  It may have something to do with the rest of the page.

Finally, if you are not using MathML input, then it would be more efficient to load tex-chtml.js rather than tex-mml-chtml.js (though this should not be the issue).

Davide


-- 
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

Sean Quallen

unread,
Oct 29, 2019, 1:25:26 PM10/29/19
to MathJax Users
Davide,

I added the script, and it gave me this error in the console

Cannot set property '_nodes' of undefined VM821:1 
TypeError: Cannot set property '_nodes' of undefined
    at u (tex-mml-chtml.js:1)
    at p (tex-mml-chtml.js:1)
    at y (tex-mml-chtml.js:1)
    at new <anonymous> (prototype.js?v=3500.0.6-rel.16+7744aa6:392)
    at node.<computed> (tex-mml-chtml.js:1)
    at p.s.create (tex-mml-chtml.js:1)
    at new i (tex-mml-chtml.js:1)
    at new o (tex-mml-chtml.js:1)
    at M.compile (tex-mml-chtml.js:1)
    at e.n.compile (tex-mml-chtml.js:1)

This is being used in an online course management system at a university. I've attached the HTML source document, although I cannot make heads or tails out of it. As I said--complete novice here. Thanks for the help!
To unsubscribe from this group and stop receiving emails from it, send an email to mathja...@googlegroups.com.
Source.html

Davide Cervone

unread,
Oct 29, 2019, 2:16:16 PM10/29/19
to mathja...@googlegroups.com
Well, the page loads a LOT of external scripts (that I don't have access to), so it is quite possible that it is one of those that is causing the problem.  For example, the error stack that you provided indicates that the prototype.js script is handling a "new" call at some point (because the scripts are all compressed, it is difficult to tell exactly where), and it may be that prototype.js has replaced or updated a standard object class and its implementation is not fully compatible with the official version that it has replaced.  According to their web site, the current version of prototype.js is from 2015, and that is quite a while ago in web years, so maybe it is the source of the problem.

The error message indicates that setting the _nodes property of an undefined variable is the issue, but there are only two spots where MathJax sets a _nodes property, and they both look good (they are both "this._nodes = ..." in places where "this" should be defined).  So I'm at a loss to say what it going on.  Without ore complete access to the system, I'm afraid I can't tell you want is wrong.  But my suspicion is that something like prototype.js is causing an incompatibility.

Davide



To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/53e6f239-671d-47fc-9d9a-34df73f81b51%40googlegroups.com.
<Source.html>

Sean Quallen

unread,
Oct 31, 2019, 10:45:05 PM10/31/19
to MathJax Users
Thanks Davide. I have zero control over changing that so I'll just stick with using version 2.x as it works fine for my needs. Any idea about how long that CDN will be active for rendering? Will it be shut down in lieu of version 3.x at any time soon?

Sean

Davide Cervone

unread,
Nov 1, 2019, 6:27:19 AM11/1/19
to mathja...@googlegroups.com
We don't control cdnjs, but it is designed to maintain older versions, so my understanding is that these will remain available with no expected end date.

Davide


To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/65d8dacc-5bad-4464-a932-965e7267abdb%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages