Skip to content

Conversation

@Alex-Jordan
Copy link
Contributor

We have long put author-demanded packages (cancel, etc) in a \require{} inside a block of math content. And long placed author-defined macros in the same block of math content.

This change moves all of that into the actual configuration block for MathJax. This was motivated by certain changes I'd like to make for WeBWorK, but just seems like the actual appropriate way to do all this. I don't believe it was possible with MJ2, so we did what we did. And held onto it. But with my testing of the sample article with both MJ3 and MJ4, this works.

This warrants lots of testing. I'll try other projects, other browsers, other devices, etc. But I wanted to post it here to see if there is interest in even more people testing. Marking this as draft until I can report more testing.

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 7, 2026

I've looked at this closely. I can't check too much further right now, but I think we are unable to alter the MathJax configuration for Jupyter notebooks?

Can you test there? Yes, the conversion has been neglected, but no, it has not been abandoned. And there are reasons to move its necessary maintanence up in priority.

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 7, 2026

I built the sample article with the Jupyter conversion stylesheet. (Requires using xsltproc.)

Section 7, "Mathematics" has its problems, but the cancel package is working.

JupyterLite looks like it may a good place to test viewing notebooks.

https://jupyterlite.github.io/demo/lab/index.html

@Alex-Jordan
Copy link
Contributor Author

Does Section 7 have its problems with or without this change? Or only with this change?

The cancel extension is probably not what we should test with, because it is automatically included when the autoload extension is used. Any combined components configuration of MJ that includes TeX input jax loads autoload. So for example PTX uses tex-svg.js, tex-mml-chtml.js, or tex-chtml.js, and these all load cancel already.

I took a short look at Jupyter and how it seems to load MJ. It seems to use the mathjax-full combined component (available with MJ3, but not MJ4). Which I assume also loads autoload.

Is it up for consideration to keep things the same for Jupyter notebooks, while making a change like this for HTML? I can appreciate not wanting divergent MathJax details to maintain. It seems that the Jupyter MJ config is what it is though, and in one sense it's already divergent from the config used in PTX HTML. It would be a matter of still getting extensions to work in Jupyter.

I won't be fast with this, too many local issues with our term having started. But I think I'll post some sort of record of what I test as I go.

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 7, 2026 via email

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 8, 2026 via email

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants