critical MathJax bug with 4.1.2

22 views
Skip to first unread message

Alex Jordan

unread,
Jun 17, 2026, 6:48:36 PMJun 17
to prete...@googlegroups.com
PreTeXt is using MathJax 4.1.2. This version (not say 4.1.1) introduced a bug where certain expressions can cause MathJax to crash. See this MathJax issue and linked issues:


The offending input in that example may look like something you'd never do, but it only needs to be a subsequence of your input string in order for the crash to happen. And as you can see from the other linked issues, the conditions to trigger this are a bit specific, but not specific to say, using \nabla.

This is either something to be aware of, or PreTeXt could revert to 4.1.1 for now. Probably want to upgrade past 4.1.2 as soon as this is fixed though.

Alex Jordan

unread,
Jun 17, 2026, 9:38:44 PMJun 17
to prete...@googlegroups.com
When I posted my last message about this, it was a somewhat academic issue. A WeBWorK user with somewhat obscure math syntax in use had hit this issue, and that led to my post on the MathJax forum.

Just now though, while working on one of my PreTeXt projects, I find a page is freezing in the same way. I manually changed the page to load MJ 4.1.1 and then things are fine. So I can now report that this issue is affecting a PTX project. (I don't know what specific bit of math on the page is causing the freeze though, it's too big of a page.)

Rob Beezer

unread,
Jun 22, 2026, 11:22:07 AMJun 22
to prete...@googlegroups.com
Thanks, Alex, for tracking this one.

Volker has made a fix for SRE (Speech Rule Engine, a key MJ component), and
Davide suggests a new release in a week or two. So I think it will be better to
wait this one out, rather than suggesting publishers rebuild twice in a matter
of weeks.

There is a fix on Alex's PR, and more discussion and references there. I'm
going to close it now, but it will still be available. If you really want to go
back a version, the code there will show you how.

https://github.com/PreTeXtBook/pretext/pull/2941

@Alex - would you mind checking up on this after 4.1.3 comes out?

Rob


On 6/17/26 18:38, Alex Jordan wrote:
> When I posted my last message about this, it was a somewhat academic issue. A
> WeBWorK user with somewhat obscure math syntax in use had hit this issue, and
> that led to my post on the MathJax forum.
>
> Just now though, while working on one of my PreTeXt projects, I find a page is
> freezing in the same way. I manually changed the page to load MJ 4.1.1 and then
> things are fine. So I can now report that this issue is affecting a PTX project.
> (I don't know what specific bit of math on the page is causing the freeze
> though, it's too big of a page.)
>
> On Wed, Jun 17, 2026 at 3:48 PM Alex Jordan <jordanc...@gmail.com
> <mailto:jordanc...@gmail.com>> wrote:
>
> PreTeXt is using MathJax 4.1.2. This version (not say 4.1.1) introduced a
> bug where certain expressions can cause MathJax to crash. See this MathJax
> issue and linked issues:
>
> https://github.com/mathjax/MathJax/issues/3578 <https://github.com/mathjax/
> MathJax/issues/3578>
>
> The offending input in that example may look like something you'd never do,
> but it only needs to be a subsequence of your input string in order for the
> crash to happen. And as you can see from the other linked issues, the
> conditions to trigger this are a bit specific, but not specific to say,
> using \nabla.
>
> This is either something to be aware of, or PreTeXt could revert to 4.1.1
> for now. Probably want to upgrade past 4.1.2 as soon as this is fixed though.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CA%2BR-jrc%2Bqv4--xo-s7KHvczn6-cvvBL4zL5dKHUkNM9uUdem_g%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jrc%2Bqv4--xo-s7KHvczn6-
> cvvBL4zL5dKHUkNM9uUdem_g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Jul 4, 2026, 1:38:06 PM (7 days ago) Jul 4
to prete...@googlegroups.com
MathJax 4.1.3 has been relesed, and this seems to be the headline bugfix.

Every project built in the past few months should see the fix already, but it
may mean waiting on CDNs or rereshing pages. I'm seeing it in the sample
article online right now, without any heroics at all.

Thanks, Alex, for alerting us, and MJ, to this one.

Rob

On 6/17/26 18:38, Alex Jordan wrote:
> When I posted my last message about this, it was a somewhat academic issue. A
> WeBWorK user with somewhat obscure math syntax in use had hit this issue, and
> that led to my post on the MathJax forum.
>
> Just now though, while working on one of my PreTeXt projects, I find a page is
> freezing in the same way. I manually changed the page to load MJ 4.1.1 and then
> things are fine. So I can now report that this issue is affecting a PTX project.
> (I don't know what specific bit of math on the page is causing the freeze
> though, it's too big of a page.)
>
> On Wed, Jun 17, 2026 at 3:48 PM Alex Jordan <jordanc...@gmail.com
> <mailto:jordanc...@gmail.com>> wrote:
>
> PreTeXt is using MathJax 4.1.2. This version (not say 4.1.1) introduced a
> bug where certain expressions can cause MathJax to crash. See this MathJax
> issue and linked issues:
>
> https://github.com/mathjax/MathJax/issues/3578 <https://github.com/mathjax/
> MathJax/issues/3578>
>
> The offending input in that example may look like something you'd never do,
> but it only needs to be a subsequence of your input string in order for the
> crash to happen. And as you can see from the other linked issues, the
> conditions to trigger this are a bit specific, but not specific to say,
> using \nabla.
>
> This is either something to be aware of, or PreTeXt could revert to 4.1.1
> for now. Probably want to upgrade past 4.1.2 as soon as this is fixed though.
>
Reply all
Reply to author
Forward
0 new messages