r/IPython • u/narfus • May 06 '20
preloading MathJax extensions
I'm trying to preload cancel.js for every notebook instead of using \require.
The MathJax 2.7 docs say:
To use this extension in your own configurations, add it to the extensions array in the TeX block.
TeX: { extensions: ["cancel.js"] }This extension is not included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands.
So I put in my custom.js inside MathJax.Hub.Config({}), which does work for other customizations like displayAlign:left. But it doesn't work and I still have to \require it.
Then I see in extensions/Safe.js:
MathJax.Hub.CombineConfig("Safe", {
allow: {
...
require: "safe"
},
safeRequire: {
...
cancel: trueIs that interfering with explicit preloading? I don't think so.
View all comments
Show parent comment
1
u/narfus May 06 '20 edited May 06 '20
Thanks a lot; I had wondered about how to use MJ3 instead. Can I do it with plain Jupyter? Is there any solid reason to stick with plain Jupyter at this point?
I'm still curious about what I'm doing wrong, or more generally how extensions are loaded/filtered.