MathJax configuration for WeBWorK

15 views
Skip to first unread message

Rob Beezer

unread,
Aug 23, 2026, 2:43:18 PMAug 23
to prete...@googlegroups.com
I'd like to have a few more eyes on

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

Oscar, Andrew, Brad? And anybody else interested. In brief, as I understand
it, the configuration for MathJax, as applied to WeBWork problems (in HTML) will
be the configuration supplied by WeBWorK itself.

WW is on MJ3, we have moved to MJ4; which I guess is not an issue at all.

Given trials with WW in knowls and in the Runestone assignment builder, I'm
reluctant to pass judgement on this one by myself.

Thanks,
Rob

Alex Jordan

unread,
Aug 23, 2026, 4:22:59 PMAug 23
to prete...@googlegroups.com
It's not a change that for live rendered WeBWorK exercises, that the webwork2 server provides MathJax. That has always been the case. The change is only that the config for that MathJax will now be the official config that the webwork2 server uses. Not one that we supply. This is good, because even the config we are deleting her has drifted farther and farther from what is really needed with the MathJax that a webwork2 server is putting out. 

--
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.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxT1pHWkVScGk.1787510595%40pnsh.

Rob Beezer

unread,
Aug 23, 2026, 5:20:37 PMAug 23
to prete...@googlegroups.com
On 8/23/26 13:22, Alex Jordan wrote:
> Not one that we supply.

You mean, not one that we control. ;-)

> This is good, because even the config we
> are deleting her has drifted farther and farther from what is really needed with
> the MathJax that a webwork2 server is putting out.
And why has it drifted?

Rob

Alex Jordan

unread,
Aug 23, 2026, 6:06:06 PMAug 23
to prete...@googlegroups.com
> And why has it drifted?

Because I didn't monitor everything, and the drift didn't cause anyone to report a bug.

So what's being deleted is a snapshot of the config that WW used for 2.17. And that's kind of the point. This change just makes sure the right config is always loaded for the right version of WW that the server supplies. This is MathJax for live, activatrf WeBWorK in an iframe, with content coning from a WW server. It's not for the static representation. So I don't understand the concern. 

Rob Beezer

unread,
Aug 24, 2026, 7:19:43 PMAug 24
to prete...@googlegroups.com
Two things going on here. We have multiple projects that want to add Javascript
to our HTML pages: Runestone, WeBWorK, permalinks, image zooming, printouts,
Dynamic Fill-in-The-Blanks, Doenet, STACK (I think), and so on. Likely each is
very good in isolation. But it is a lot to keep up with, I am not the most
knowledgeable, every project wants to do their own thing their own way. And it
is development work that does not interest me as much as other aspects of PreTeXt.

I do not plan to let WW serve its own MathJax configuration at-will and we have
to add that to the list of what projects are writing into our pages.

If we accept, with no safeguards, WW's configuration, how will we know when it
changes? How do we debug rendering of mathematics when we suddenly get
something different?

So here is a concrete example, though still speculative.

* I think MathJax 4 has changed how it supports LaTeX packages for color.

* Suppose we adopt those changes.

* Now a WW problem is giving us a Mathjax 3 configuration.

Do authors write their LaTeX syntax two different ways? Inside WW (v3) and
outside WW (v4)? Can we adjust **our** configuration for MathJax-in-WW to move
with the new possibilities for color? Maybe not. But I don't want to ask WW
for a change and wait for the next release.

I'm sure there are some holes in that argument, but perhaps the flavor is
enough. I suspect changes in how the \text{} macro behaves will already
demonstrate this. Try \text{#} versus \text{\#}.

The short answer is that I am becoming negative about accomodating the
idosyncracies of other projects that want a home in PreTeXt. If I could wave a
magic wand, we would have some standards/API that projects could conform to instead.

Rob
> --
> 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-jrfcLXN6CvSMoBJmDVjxFjiUd%2B4F4QPK02GBWH_a5O2Mqw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-
> jrfcLXN6CvSMoBJmDVjxFjiUd%2B4F4QPK02GBWH_a5O2Mqw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Alex Jordan

unread,
Aug 24, 2026, 9:46:56 PMAug 24
to prete...@googlegroups.com
> *  Now a WW problem is giving us a Mathjax 3 configuration 

Are you under the impression that the PR in question downgrades to using MJ3? That's what it is already using in the present day. MJ3, with a config that the PR seems to replace with a better config.

Alex Jordan

unread,
Aug 24, 2026, 9:47:58 PMAug 24
to prete...@googlegroups.com
"seeks to replace"

Alex Jordan

unread,
Aug 25, 2026, 1:22:37 AMAug 25
to prete...@googlegroups.com
I'm sorry I can't make tomorrow's drop-in, but I have conflicts.

Everything you are saying about v3 versus v4 differences is fine and valid, except is raising issues that are present with or without PR #3172. The live embedded WeBWorK exercises (in a PTX book, in a Runestone assignment, etc) have always used a MathJax distribution from the webwork2 server. Never the MathJax distribution+config that PTX generally uses in pages. Just visit here:

and peek at MathJax versions for the ambient page versus the embedded exercise (once activated).

Screenshot 2026-08-24 at 9.32.24 PM.png

Any scenario you can come up with using \color, \text, etc is no more or no less of an issue with or without the commit under discussion.

Alex Jordan

unread,
Aug 25, 2026, 1:23:32 AMAug 25
to prete...@googlegroups.com
Trying that screenshot again...

Screenshot 2026-08-24 at 9.32.24 PM.png

Rob Beezer

unread,
Aug 25, 2026, 11:03:07 AMAug 25
to prete...@googlegroups.com
No, I think I understand the situation just fine. Not agreeing with a change
does not mean I do not understand it.

Everybody loves LaTeX because your thesis from 40 years ago will still compile.

But the LaTeX supported by MathJax changes by the version. And crucially, we
have adopted the MathJax-supported subset of LaTeX as a key component of the
*language definition* of PreTeXt. We'll trade-in this variability for all the
good things MJ does for us.


Consider an octothorpe in a \text{} macro inside an #m

Construction On the page (MJ 4.1.3) In WeBWorK problem (MJ 3.2.2)
\text{#} error "Misplaced '#'" renders # correctly
\text{\#} renders # correctly renders literal # with backslash

We should not require *two different ways* of doing the same thing successfully,
depending on if you are, or are not, inside a WW problem. Inexcusable for a
language we claim to be unambiguous.

So how do we fix this? Wait for the next annual release of WW servers and hope
they have migrated to MJ4? And then wait years for in-use MJ3 server versions
to go end-of-life?

Or can we fix this discrepancy ourselves? I do not know right now. But we have
more of a fighting chance if *we control the configuration*. So we will keep
the configuration on our side, not farm it out.

Rob


On 8/24/26 22:23, Alex Jordan wrote:
> Trying that screenshot again...
>
> Screenshot 2026-08-24 at 9.32.24 PM.png
>
>
> On Mon, Aug 24, 2026 at 10:22 PM Alex Jordan <jordanc...@gmail.com
> <mailto:jordanc...@gmail.com>> wrote:
>
> I'm sorry I can't make tomorrow's drop-in, but I have conflicts.
>
> Everything you are saying about v3 versus v4 differences is fine and valid,
> except is raising issues that are present with or without PR #3172. The live
> embedded WeBWorK exercises (in a PTX book, in a Runestone assignment, etc)
> have always used a MathJax distribution from the webwork2 server. Never the
> MathJax distribution+config that PTX generally uses in pages. Just visit here:
> https://pretextbook.org/examples/webwork/sample-chapter/html/section-the-
> quadratic-formula.html <https://pretextbook.org/examples/webwork/sample-
> chapter/html/section-the-quadratic-formula.html>
>
> and peek at MathJax versions for the ambient page versus the embedded
> exercise (once activated).
>
> Screenshot 2026-08-24 at 9.32.24 PM.png
>
> Any scenario you can come up with using \color, \text, etc is no more or no
> less of an issue with or without the commit under discussion.
>
>
> On Mon, Aug 24, 2026 at 6:47 PM Alex Jordan <jordanc...@gmail.com
> <mailto:jordanc...@gmail.com>> wrote:
>
> "seeks to replace"
>
> On Mon, Aug 24, 2026, 6:46 PM Alex Jordan <jordanc...@gmail.com
> <mailto:jordanc...@gmail.com>> wrote:
>
> > *  Now a WW problem is giving us a Mathjax 3 configuration
>
> Are you under the impression that the PR in question downgrades to
> using MJ3? That's what it is already using in the present day. MJ3,
> with a config that the PR seems to replace with a better config.
>
> --
> 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-jrfd2doxsdew1c%3D8Enr6j6Vw6YejcELvujqnwR5MGJFRrA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-dev/CA%2BR-
> jrfd2doxsdew1c%3D8Enr6j6Vw6YejcELvujqnwR5MGJFRrA%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages